From 23a6ad67422cfa19dca8d9eea500ae8309c7c11d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 17 Aug 2011 00:24:56 +0200 Subject: [PATCH] Verify that the default location is valid. --- src/de/todesbaum/jsite/main/ConfigurationLocator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.7.4