Changeset - 8c3f6ec929d6
[Not reviewed]
default
0 1 0
Jason Maltzen (jmaltzen) - 9 years ago 2015-12-31 05:50:21
jason.maltzen@unsanctioned.net
Fix an error with searching for application data directories
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
FileUtils.cs
Show inline comments
...
 
@@ -20,12 +20,11 @@ namespace DesertPaintLab
 
            dirPath = System.IO.Path.Combine(
 
                System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
 
                "data", 
 
                dirname);
 
            if (!System.IO.Directory.Exists(dirPath))
 
            if (System.IO.Directory.Exists(dirPath))
 
            {
 
                // not found
 
                dirPath = null;
 
                return dirPath;
 
            }
 
            // try "Resources" in case this is a Mac app bundle
 
            dirPath = System.IO.Path.Combine(
 
                Environment.GetFolderPath(Environment.SpecialFolder.Resources), "data", dirname);
...
 
@@ -43,12 +42,12 @@ namespace DesertPaintLab
 
            dirPath = System.IO.Path.Combine(
 
                System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
 
                "Resources", "data",
 
                dirname);
 
            if (!System.IO.Directory.Exists(dirPath))
 
            if (System.IO.Directory.Exists(dirPath))
 
            {
 
                // not found
 
                dirPath = null;
 
                return dirPath;
 
            }
 
            dirPath = System.IO.Path.Combine(
 
                System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
 
                "Resources", 
0 comments (0 inline, 0 general)