|
@@ -24,8 +24,6 @@ import java.nio.file.Path;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
import java.util.Random;
|
|
|
-import java.util.Set;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* The settings specific to a single vault.
|
|
@@ -37,7 +35,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_FILENAME_LENGTH_LIMIT = -1;
|
|
|
+ public static final int DEFAULT_MAX_CLEARTEXT_FILENAME_LENGTH = -1;
|
|
|
public static final WhenUnlocked DEFAULT_ACTION_AFTER_UNLOCK = WhenUnlocked.ASK;
|
|
|
|
|
|
private static final Random RNG = new Random();
|
|
@@ -52,7 +50,7 @@ public class VaultSettings {
|
|
|
private final StringProperty customMountPath = new SimpleStringProperty();
|
|
|
private final BooleanProperty usesReadOnlyMode = new SimpleBooleanProperty(DEFAULT_USES_READONLY_MODE);
|
|
|
private final StringProperty mountFlags = new SimpleStringProperty(DEFAULT_MOUNT_FLAGS);
|
|
|
- private final IntegerProperty filenameLengthLimit = new SimpleIntegerProperty(DEFAULT_FILENAME_LENGTH_LIMIT);
|
|
|
+ private final IntegerProperty maxCleartextFilenameLength = new SimpleIntegerProperty(DEFAULT_MAX_CLEARTEXT_FILENAME_LENGTH);
|
|
|
private final ObjectProperty<WhenUnlocked> actionAfterUnlock = new SimpleObjectProperty<>(DEFAULT_ACTION_AFTER_UNLOCK);
|
|
|
|
|
|
private final StringBinding mountName;
|
|
@@ -63,7 +61,7 @@ public class VaultSettings {
|
|
|
}
|
|
|
|
|
|
Observable[] observables() {
|
|
|
- return new Observable[]{path, displayName, winDriveLetter, unlockAfterStartup, revealAfterMount, useCustomMountPath, customMountPath, usesReadOnlyMode, mountFlags, filenameLengthLimit, actionAfterUnlock};
|
|
|
+ return new Observable[]{path, displayName, winDriveLetter, unlockAfterStartup, revealAfterMount, useCustomMountPath, customMountPath, usesReadOnlyMode, mountFlags, maxCleartextFilenameLength, actionAfterUnlock};
|
|
|
}
|
|
|
|
|
|
public static VaultSettings withRandomId() {
|
|
@@ -152,8 +150,8 @@ public class VaultSettings {
|
|
|
return mountFlags;
|
|
|
}
|
|
|
|
|
|
- public IntegerProperty filenameLengthLimit() {
|
|
|
- return filenameLengthLimit;
|
|
|
+ public IntegerProperty maxCleartextFilenameLength() {
|
|
|
+ return maxCleartextFilenameLength;
|
|
|
}
|
|
|
|
|
|
public ObjectProperty<WhenUnlocked> actionAfterUnlock() {
|