mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-30 08:26:19 +00:00
fixes #1289 by decoupling storage path from vault name
This commit is contained in:
@@ -70,7 +70,7 @@ public class VaultSettings {
|
||||
if (!mountNameSet && dirnameExists) {
|
||||
mountName.set(normalizeMountName(newPath.getFileName().toString()));
|
||||
} else if (!mountNameSet && !dirnameExists) {
|
||||
mountName.set(DEFAULT_MOUNT_NAME + id);
|
||||
mountName.set(DEFAULT_MOUNT_NAME + " " + id);
|
||||
} else if (mountNameSet && dirnameExists) {
|
||||
if (mountName.get().equals(DEFAULT_MOUNT_NAME + id)) {
|
||||
//this is okay, since this function is only executed if the path changes (aka, the vault is created or added)
|
||||
|
||||
@@ -78,7 +78,7 @@ public class Vault {
|
||||
this.state = state;
|
||||
this.lastKnownException = lastKnownException;
|
||||
this.stats = stats;
|
||||
this.displayableName = Bindings.createStringBinding(this::getDisplayableName, vaultSettings.path());
|
||||
this.displayableName = Bindings.createStringBinding(this::getDisplayableName, vaultSettings.mountName());
|
||||
this.displayablePath = Bindings.createStringBinding(this::getDisplayablePath, vaultSettings.path());
|
||||
this.locked = Bindings.createBooleanBinding(this::isLocked, state);
|
||||
this.processing = Bindings.createBooleanBinding(this::isProcessing, state);
|
||||
@@ -230,8 +230,7 @@ public class Vault {
|
||||
}
|
||||
|
||||
public String getDisplayableName() {
|
||||
Path p = vaultSettings.path().get();
|
||||
return p.getFileName().toString();
|
||||
return vaultSettings.mountName().get();
|
||||
}
|
||||
|
||||
public StringBinding accessPointProperty() {
|
||||
|
||||
Reference in New Issue
Block a user