mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Change default data path to $XDG_DATA_HOME/signal-cli
Closes #152 and #125
This commit is contained in:
parent
ffbc356218
commit
337f84ed21
4 changed files with 50 additions and 16 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue