]> nmode's Git Repositories - signal-cli/commitdiff
Remove fallbacks to deprecated data paths
authorAsamK <asamk@gmx.de>
Sun, 8 Aug 2021 13:52:44 +0000 (15:52 +0200)
committerAsamK <asamk@gmx.de>
Sun, 8 Aug 2021 13:52:54 +0000 (15:52 +0200)
CHANGELOG.md
README.md
man/signal-cli.1.adoc
src/main/java/org/asamk/signal/App.java

index 60eaa33a5a08d0f41ca3949df3619e43f70b9ff8..4b3085f286501c11a4ca72d55df0809dbc828154 100644 (file)
@@ -1,8 +1,10 @@
 # Changelog
 
 ## [Unreleased]
-### Changed
+### Breaking changes
 - Removed deprecated `--json` parameter, use `--output=json` instead
+- Removed deprecated fallback data paths, only `$XDG_DATA_HOME/signal-cli` is used now
+  For those still using the old paths (`$HOME/.config/signal`, `$HOME/.config/textsecure`) you need to move those to the new location.
 
 ## [0.8.5] - 2021-08-07
 ### Added
index 86e8591bc62ec60ed3876fe0e7bfc33235d20de1..f8eee725ff5d726fb2b903b367a2396d194cc5a1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -67,11 +67,6 @@ The password and cryptographic keys are created when registering and stored in t
         $XDG_DATA_HOME/signal-cli/data/
         $HOME/.local/share/signal-cli/data/
 
-For legacy users, the old config directories are used as a fallback:
-
-        $HOME/.config/signal/data/
-        $HOME/.config/textsecure/data/
-
 ## Building
 
 This project uses [Gradle](http://gradle.org) for building and maintaining
index a821d2a8237f031f05464d5cfeb78b252bd474ba..54bf86710af7c29cec96c61841f8f1b0be7cba4c 100644 (file)
@@ -503,12 +503,6 @@ The password and cryptographic keys are created when registering and stored in t
 
 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
 
-For legacy users, the old config directories are used as a fallback:
-
-    $HOME/.config/signal/
-
-    $HOME/.config/textsecure/
-
 == Authors
 
 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
index 86d9a9719ad94cc298a710ca75ec22f93d1c9d74..9e410d2f10c96df4bbd79f024f2a5f319d56622a 100644 (file)
@@ -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");
     }
 }