+ configDir = System.getProperty("CONFIG_DIR");
+ if (configDir == null) {
+ configDir = System.getenv("CONFIG_DIR");
+ }
+
+ if (configDir == null) {
+ configDir = new File(System.getProperty("user.home"), ".fanfix")
+ .getPath();
+ }
+
+ if (!new File(configDir).exists()) {
+ new File(configDir).mkdirs();
+ } else {
+ Bundles.setDirectory(configDir);
+ }
+
+ try {
+ config = new ConfigBundle();
+ config.updateFile(configDir);
+ } catch (IOException e) {
+ tracer.error(e);
+ }
+ try {
+ uiconfig = new UiConfigBundle();
+ uiconfig.updateFile(configDir);
+ } catch (IOException e) {
+ tracer.error(e);
+ }
+
+ // No updateFile for this one! (we do not want the user to have custom
+ // translations that won't accept updates from newer versions)
+ trans = new StringIdBundle(getLang());
+
+ // Fix an old bug (we used to store custom translation files by
+ // default):
+ if (trans.getString(StringId.INPUT_DESC_CBZ) == null) {
+ // TODO: create the deleteFile method
+ // trans.deleteFile(configDir);
+ }
+
+ Bundles.setDirectory(configDir);
+
+ uiconfig = new UiConfigBundle();