From: David ‘Bombe’ Roden Date: Tue, 16 Aug 2011 22:24:56 +0000 (+0200) Subject: Verify that the default location is valid. X-Git-Tag: 0.10-rc1~51 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=23a6ad67422cfa19dca8d9eea500ae8309c7c11d;p=jSite.git Verify that the default location is valid. --- diff --git a/src/de/todesbaum/jsite/main/ConfigurationLocator.java b/src/de/todesbaum/jsite/main/ConfigurationLocator.java index 2d7ed45..0c7d118 100644 --- a/src/de/todesbaum/jsite/main/ConfigurationLocator.java +++ b/src/de/todesbaum/jsite/main/ConfigurationLocator.java @@ -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; } }