Fix vault preferences not respecting custom storage directory

This commit is contained in:
crschnick 2024-02-28 08:18:45 +00:00
parent d2d0df9789
commit f7cf7284c7

View file

@ -93,8 +93,7 @@ public class AppPrefs {
map(new SimpleBooleanProperty(true), "openConnectionSearchWindowOnConnectionCreation", Boolean.class); map(new SimpleBooleanProperty(true), "openConnectionSearchWindowOnConnectionCreation", Boolean.class);
final ObjectProperty<Path> storageDirectory = final ObjectProperty<Path> storageDirectory =
map(new SimpleObjectProperty<>(DEFAULT_STORAGE_DIR), "storageDirectory", Path.class); map(new SimpleObjectProperty<>(DEFAULT_STORAGE_DIR), "storageDirectory", Path.class);
private final AppPrefsStorageHandler vaultStorageHandler = private AppPrefsStorageHandler vaultStorageHandler;
new AppPrefsStorageHandler(storageDirectory().getValue().resolve("preferences.json"));
final BooleanProperty developerMode = map(new SimpleBooleanProperty(false), "developerMode", Boolean.class); final BooleanProperty developerMode = map(new SimpleBooleanProperty(false), "developerMode", Boolean.class);
final BooleanProperty developerDisableUpdateVersionCheck = final BooleanProperty developerDisableUpdateVersionCheck =
map(new SimpleBooleanProperty(false), "developerDisableUpdateVersionCheck", Boolean.class); map(new SimpleBooleanProperty(false), "developerDisableUpdateVersionCheck", Boolean.class);
@ -428,6 +427,8 @@ public class AppPrefs {
loadValue(globalStorageHandler, value); loadValue(globalStorageHandler, value);
} }
vaultStorageHandler = new AppPrefsStorageHandler(storageDirectory().getValue().resolve("preferences.json"));
} }
private void loadSharedRemote() { private void loadSharedRemote() {