mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-14 08:41:28 +00:00
support home-relative paths for cryptomator.keychainPath
This commit is contained in:
@@ -64,11 +64,14 @@ class WindowsProtectedKeychainAccess implements KeychainAccessStrategy {
|
||||
} else {
|
||||
this.dataProtection = null;
|
||||
}
|
||||
final String keychainPathProperty = System.getProperty("cryptomator.keychainPath");
|
||||
String keychainPathProperty = System.getProperty("cryptomator.keychainPath");
|
||||
if (dataProtection != null && keychainPathProperty == null) {
|
||||
LOG.warn("Windows DataProtection module loaded, but no keychainPath configured.");
|
||||
LOG.warn("Windows DataProtection module loaded, but no cryptomator.keychainPath property found.");
|
||||
}
|
||||
if (keychainPathProperty != null) {
|
||||
if (keychainPathProperty.startsWith("~/")) {
|
||||
keychainPathProperty = SystemUtils.USER_HOME + keychainPathProperty.substring(1);
|
||||
}
|
||||
this.keychainPath = FileSystems.getDefault().getPath(keychainPathProperty);
|
||||
} else {
|
||||
this.keychainPath = null;
|
||||
|
||||
Reference in New Issue
Block a user