custom mount flags default to empty flags

This commit is contained in:
Sebastian Stenzel
2019-06-18 15:00:54 +02:00
parent f909f384be
commit 06abbf2dd1
2 changed files with 4 additions and 3 deletions

View File

@@ -35,9 +35,10 @@ public class VaultSettings {
public static final boolean DEFAULT_REAVEAL_AFTER_MOUNT = true;
public static final boolean DEFAULT_USES_INDIVIDUAL_MOUNTPATH = false;
public static final boolean DEFAULT_USES_READONLY_MODE = false;
public static final List<String> DEFAULT_MOUNT_FLAGS = List.of();
private final String id;
private final ObjectProperty<Path> path = new SimpleObjectProperty<>();
private final ObjectProperty<Path> path = new SimpleObjectProperty();
private final StringProperty mountName = new SimpleStringProperty();
private final StringProperty winDriveLetter = new SimpleStringProperty();
private final BooleanProperty unlockAfterStartup = new SimpleBooleanProperty(DEFAULT_UNLOCK_AFTER_STARTUP);
@@ -45,7 +46,7 @@ public class VaultSettings {
private final BooleanProperty usesIndividualMountPath = new SimpleBooleanProperty(DEFAULT_USES_INDIVIDUAL_MOUNTPATH);
private final StringProperty individualMountPath = new SimpleStringProperty();
private final BooleanProperty usesReadOnlyMode = new SimpleBooleanProperty(DEFAULT_USES_READONLY_MODE);
private final ObjectProperty<List<String>> mountFlags = new SimpleObjectProperty<>(List.of());
private final ObjectProperty<List<String>> mountFlags = new SimpleObjectProperty(DEFAULT_MOUNT_FLAGS);
public VaultSettings(String id) {
this.id = Objects.requireNonNull(id);

View File

@@ -46,7 +46,7 @@ class VaultSettingsJsonAdapter {
boolean revealAfterMount = VaultSettings.DEFAULT_REAVEAL_AFTER_MOUNT;
boolean usesIndividualMountPath = VaultSettings.DEFAULT_USES_INDIVIDUAL_MOUNTPATH;
boolean usesReadOnlyMode = VaultSettings.DEFAULT_USES_READONLY_MODE;
List<String> mountFlags = null;
List<String> mountFlags = VaultSettings.DEFAULT_MOUNT_FLAGS;
in.beginObject();
while (in.hasNext()) {