mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Remove fallbacks to deprecated data paths
This commit is contained in:
parent
17d00d6ca8
commit
f449a242e4
4 changed files with 5 additions and 37 deletions
|
@ -305,32 +305,9 @@ public class App {
|
|||
}
|
||||
|
||||
/**
|
||||
* Uses $XDG_DATA_HOME/signal-cli if it exists, or if none of the legacy directories exist:
|
||||
* - $HOME/.config/signal
|
||||
* - $HOME/.config/textsecure
|
||||
*
|
||||
* @return the data directory to be used by signal-cli.
|
||||
* @return the default data directory to be used by signal-cli.
|
||||
*/
|
||||
private static File getDefaultDataPath() {
|
||||
var dataPath = new File(IOUtils.getDataHomeDir(), "signal-cli");
|
||||
if (dataPath.exists()) {
|
||||
return dataPath;
|
||||
}
|
||||
|
||||
var configPath = new File(System.getProperty("user.home"), ".config");
|
||||
|
||||
var legacySettingsPath = new File(configPath, "signal");
|
||||
if (legacySettingsPath.exists()) {
|
||||
logger.warn("Using legacy data path \"{}\", please move it to \"{}\".", legacySettingsPath, dataPath);
|
||||
return legacySettingsPath;
|
||||
}
|
||||
|
||||
legacySettingsPath = new File(configPath, "textsecure");
|
||||
if (legacySettingsPath.exists()) {
|
||||
logger.warn("Using legacy data path \"{}\", please move it to \"{}\".", legacySettingsPath, dataPath);
|
||||
return legacySettingsPath;
|
||||
}
|
||||
|
||||
return dataPath;
|
||||
return new File(IOUtils.getDataHomeDir(), "signal-cli");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue