mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Use File instead of String
This commit is contained in:
parent
5c754b6f5d
commit
22f19c4067
7 changed files with 61 additions and 54 deletions
|
@ -212,17 +212,19 @@ public class Main {
|
|||
* @return the data directory to be used by signal-cli.
|
||||
*/
|
||||
private static File getDefaultDataPath() {
|
||||
File dataPath = new File(IOUtils.getDataHomeDir(), "/signal-cli");
|
||||
File dataPath = new File(IOUtils.getDataHomeDir(), "signal-cli");
|
||||
if (dataPath.exists()) {
|
||||
return dataPath;
|
||||
}
|
||||
|
||||
File legacySettingsPath = new File(System.getProperty("user.home"), "/.config/signal");
|
||||
File configPath = new File(System.getProperty("user.home"), ".config");
|
||||
|
||||
File legacySettingsPath = new File(configPath, "signal");
|
||||
if (legacySettingsPath.exists()) {
|
||||
return legacySettingsPath;
|
||||
}
|
||||
|
||||
legacySettingsPath = new File(System.getProperty("user.home"), "/.config/textsecure");
|
||||
legacySettingsPath = new File(configPath, "textsecure");
|
||||
if (legacySettingsPath.exists()) {
|
||||
return legacySettingsPath;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue