Verify that the default location is valid.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 16 Aug 2011 22:24:56 +0000 (00:24 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Thu, 3 Nov 2011 07:45:20 +0000 (08:45 +0100)
src/de/todesbaum/jsite/main/ConfigurationLocator.java

index 2d7ed45..0c7d118 100644 (file)
@@ -173,7 +173,10 @@ public class ConfigurationLocator {
                if (hasFile(ConfigurationLocation.HOME_DIRECTORY)) {
                        return ConfigurationLocation.HOME_DIRECTORY;
                }
-               return defaultLocation;
+               if (isValidLocation(defaultLocation)) {
+                       return defaultLocation;
+               }
+               return ConfigurationLocation.HOME_DIRECTORY;
        }
 
 }