[longomatch] Fix environment initialization



commit 4a47c82622796baba1fa7b1daf15a36a3747a94f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Apr 17 20:43:04 2011 +0200

    Fix environment initialization

 LongoMatch/Main.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 4781ace..dda518f 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -183,12 +183,12 @@ namespace LongoMatch
 			
 			/* Check for the magic file PORTABLE to check if it's a portable version
 			 * and the config goes in the same folder as the binaries */
-			if (File.Exists(Constants.PROJECT_NAME))
+			if (File.Exists(System.IO.Path.Combine(baseDirectory, Constants.PORTABLE_FILE)))
 				home = baseDirectory;
 			else
 				home = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal);
 			
-			homeDirectory = System.IO.Path.Combine(homeDirectory,Constants.SOFTWARE_NAME);
+			homeDirectory = System.IO.Path.Combine(home,Constants.SOFTWARE_NAME);
 			if (Environment.OSVersion.Platform == PlatformID.Win32NT)
 				configDirectory = homeDirectory;
 			else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]