From b70ed36d591de97b742f19e037e71b9b7e790eaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Mar 2012 21:23:02 +0100 Subject: [PATCH] Remember original location the configuration was loaded from. --- src/de/todesbaum/jsite/main/Main.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 643b2ea..8dd2e55 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -147,6 +147,9 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** Mapping from page type to page. */ private final Map pages = new HashMap(); + /** The original location of the configuration file. */ + private ConfigurationLocation originalLocation; + /** * Creates a new core with the default configuration file. */ @@ -167,9 +170,9 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen configurationLocator.setCustomLocation(configFilename); } - ConfigurationLocation preferredLocation = configurationLocator.findPreferredLocation(); - logger.log(Level.CONFIG, "Using configuration from " + preferredLocation + "."); - configuration = new Configuration(configurationLocator, preferredLocation); + originalLocation = configurationLocator.findPreferredLocation(); + logger.log(Level.CONFIG, "Using configuration from " + originalLocation + "."); + configuration = new Configuration(configurationLocator, originalLocation); Locale.setDefault(configuration.getLocale()); I18n.setLocale(configuration.getLocale()); -- 2.7.4