Fix always using custom common directory

This commit is contained in:
huanghongxun
2018-09-30 20:05:31 +08:00
parent 507665cd91
commit b1b3eb9369

View File

@@ -54,14 +54,14 @@ public class Settings {
CacheRepository.setInstance(HMCLCacheRepository.REPOSITORY); CacheRepository.setInstance(HMCLCacheRepository.REPOSITORY);
HMCLCacheRepository.REPOSITORY.directoryProperty().bind(Bindings.createStringBinding(() -> { HMCLCacheRepository.REPOSITORY.directoryProperty().bind(Bindings.createStringBinding(() -> {
String str = config().getCommonDirectory(); String str = getCommonDirectory();
try { try {
Paths.get(str); Paths.get(str);
return str; return str;
} catch (InvalidPathException e) { } catch (InvalidPathException e) {
return getDefaultCommonDirectory(); return getDefaultCommonDirectory();
} }
}, config().commonDirectoryProperty())); }, config().commonDirectoryProperty(), config().commonDirTypeProperty()));
} }
public Font getFont() { public Font getFont() {