mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Use the old config directory .config/textsecure as fallback
This commit is contained in:
parent
eabd361405
commit
95278a95ce
2 changed files with 10 additions and 0 deletions
|
@ -78,6 +78,10 @@ The password and cryptographic keys are created when registering and stored in t
|
||||||
|
|
||||||
$HOME/.config/signal/data/
|
$HOME/.config/signal/data/
|
||||||
|
|
||||||
|
For legacy users, the old config directory is used as a fallback:
|
||||||
|
|
||||||
|
$HOME/.config/textsecure/data/
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
This project uses [Gradle](http://gradle.org) for building and maintaining
|
This project uses [Gradle](http://gradle.org) for building and maintaining
|
||||||
|
|
|
@ -83,6 +83,12 @@ public class Main {
|
||||||
String settingsPath = ns.getString("config");
|
String settingsPath = ns.getString("config");
|
||||||
if (TextUtils.isEmpty(settingsPath)) {
|
if (TextUtils.isEmpty(settingsPath)) {
|
||||||
settingsPath = System.getProperty("user.home") + "/.config/signal";
|
settingsPath = System.getProperty("user.home") + "/.config/signal";
|
||||||
|
if (!new File(settingsPath).exists()) {
|
||||||
|
String legacySettingsPath = System.getProperty("user.home") + "/.config/textsecure";
|
||||||
|
if (new File(legacySettingsPath).exists()) {
|
||||||
|
settingsPath = legacySettingsPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m = new Manager(username, settingsPath);
|
m = new Manager(username, settingsPath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue