Commit c2b2b712 authored by Axel Howind's avatar Axel Howind

fix application data path on macos

parent 42b5e2e9
......@@ -319,7 +319,7 @@ public abstract class FxApplication<A extends FxApplication<A, C>, C extends FxC
private File initApplicationDataDir() {
try {
String dirName = getClass().getSimpleName();
String dirName = getClass().getName();
// try to determine location by evaluating standard windows settings
String appData = System.getenv("LOCALAPPDATA");
......@@ -334,7 +334,7 @@ public abstract class FxApplication<A extends FxApplication<A, C>, C extends FxC
// then check for macos
Path home = Paths.get(System.getProperty("user.home"));
Path macosBase = home.resolveSibling(Paths.get("Library", "Application Support"));
Path macosBase = home.resolve(Paths.get("Library", "Application Support"));
if (Files.isDirectory(macosBase) && Files.isWritable(macosBase)) {
Path dir = macosBase.resolve(dirName);
Files.createDirectories(dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment