|
@@ -9,8 +9,10 @@ import com.google.common.base.Strings;
|
|
|
import com.google.common.io.BaseEncoding;
|
|
|
import javafx.beans.Observable;
|
|
|
import javafx.beans.property.BooleanProperty;
|
|
|
+import javafx.beans.property.IntegerProperty;
|
|
|
import javafx.beans.property.ObjectProperty;
|
|
|
import javafx.beans.property.SimpleBooleanProperty;
|
|
|
+import javafx.beans.property.SimpleIntegerProperty;
|
|
|
import javafx.beans.property.SimpleObjectProperty;
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
import javafx.beans.property.StringProperty;
|
|
@@ -38,6 +40,7 @@ public class VaultSettings {
|
|
|
public static final boolean DEFAULT_USES_INDIVIDUAL_MOUNTPATH = false;
|
|
|
public static final boolean DEFAULT_USES_READONLY_MODE = false;
|
|
|
public static final String DEFAULT_MOUNT_FLAGS = "";
|
|
|
+ public static final int DEFAULT_PATH_LENGTH_LIMITATION = -1;
|
|
|
|
|
|
private static final Random RNG = new Random();
|
|
|
|
|
@@ -51,6 +54,7 @@ public class VaultSettings {
|
|
|
private final StringProperty individualMountPath = new SimpleStringProperty();
|
|
|
private final BooleanProperty usesReadOnlyMode = new SimpleBooleanProperty(DEFAULT_USES_READONLY_MODE);
|
|
|
private final StringProperty mountFlags = new SimpleStringProperty(DEFAULT_MOUNT_FLAGS);
|
|
|
+ private final IntegerProperty pathLengthLimitation = new SimpleIntegerProperty(DEFAULT_PATH_LENGTH_LIMITATION);
|
|
|
|
|
|
public VaultSettings(String id) {
|
|
|
this.id = Objects.requireNonNull(id);
|
|
@@ -59,7 +63,7 @@ public class VaultSettings {
|
|
|
}
|
|
|
|
|
|
Observable[] observables() {
|
|
|
- return new Observable[]{path, mountName, winDriveLetter, unlockAfterStartup, revealAfterMount, usesIndividualMountPath, individualMountPath, usesReadOnlyMode, mountFlags};
|
|
|
+ return new Observable[]{path, mountName, winDriveLetter, unlockAfterStartup, revealAfterMount, usesIndividualMountPath, individualMountPath, usesReadOnlyMode, mountFlags, pathLengthLimitation};
|
|
|
}
|
|
|
|
|
|
private void deriveMountNameFromPath(Path path) {
|
|
@@ -146,6 +150,10 @@ public class VaultSettings {
|
|
|
public StringProperty mountFlags() {
|
|
|
return mountFlags;
|
|
|
}
|
|
|
+
|
|
|
+ public IntegerProperty pathLengthLimitation() {
|
|
|
+ return pathLengthLimitation;
|
|
|
+ }
|
|
|
|
|
|
/* Hashcode/Equals */
|
|
|
|