From: David ‘Bombe’ Roden Date: Thu, 22 Mar 2012 20:23:02 +0000 (+0100) Subject: Remember original location the configuration was loaded from. X-Git-Tag: 0.10^2~8 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b70ed36d591de97b742f19e037e71b9b7e790eaf;p=jSite.git Remember original location the configuration was loaded from. --- 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());