mount path is now configurable via -Dcryptomator.mountPointsDir and no longer hardcoded to ~/.Cryptomator or ~/Library/Application\ Support/Cryptomator

fixes #710
This commit is contained in:
Sebastian Stenzel
2019-02-21 14:03:52 +01:00
parent 53b0d5cb9f
commit 39f9da16f9
2 changed files with 10 additions and 6 deletions
@@ -31,6 +31,7 @@ public class Environment {
LOG.debug("cryptomator.ipcPortPath: {}", System.getProperty("cryptomator.ipcPortPath"));
LOG.debug("cryptomator.keychainPath: {}", System.getProperty("cryptomator.keychainPath"));
LOG.debug("cryptomator.logDir: {}", System.getProperty("cryptomator.logDir"));
LOG.debug("cryptomator.mountPointsDir: {}", System.getProperty("cryptomator.mountPointsDir"));
}
public Stream<Path> getSettingsPath() {
@@ -51,6 +52,10 @@ public class Environment {
.map(ABSOLUTE_HOME_DIR::resolve); // resolve relative path against HOME
}
public Optional<Path> getMountPointsDir() {
return getPath("cryptomator.mountPointsDir").map(this::replaceHomeDir);
}
private Optional<Path> getPath(String propertyName) {
String value = System.getProperty(propertyName);