Change default data path to $XDG_DATA_HOME/signal-cli

Closes #152 and #125
This commit is contained in:
AsamK 2018-12-08 18:26:54 +01:00
parent ffbc356218
commit 337f84ed21
4 changed files with 50 additions and 16 deletions

View file

@ -57,4 +57,13 @@ public class IOUtils {
Files.createFile(file);
}
}
public static String getDataHomeDir() {
String dataHome = System.getenv("XDG_DATA_HOME");
if (dataHome != null) {
return dataHome;
}
return System.getProperty("user.home") + "/.local/share";
}
}