]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
tails: write to persistent storage for system packages
authortobtoht <tob@featherwallet.org>
Mon, 24 Mar 2025 08:55:29 +0000 (09:55 +0100)
committertobtoht <tob@featherwallet.org>
Mon, 24 Mar 2025 08:55:38 +0000 (09:55 +0100)
src/utils/Utils.cpp
src/utils/config.cpp

index bd1bef99bf593d3c38b5c2fbe22a10974d182166..b12559233195d610413ea9c3e25e9bfa66c075ac 100644 (file)
@@ -171,6 +171,7 @@ QString defaultWalletDir() {
     }
 
     if (TailsOS::detect()) {
+#ifdef SELF_CONTAINED
         QString path = []{
             // Starting in 1.1.0 the wallet and config directory were moved from ./.feather to ./feather_data
             // A user might accidentally delete the folder containing the file hidden folder after moving the AppImage
@@ -194,6 +195,11 @@ QString defaultWalletDir() {
         }();
 
         return path;
+#else
+        if (TailsOS::detectDataPersistence()) {
+            return QDir::homePath() + "/Persistent/feather_data/wallets";
+        }
+#endif
     }
 
 #if defined(Q_OS_LINUX) or defined(Q_OS_MAC)
index adaec28aa13c465b42a33f7f52cff074c654f4fd..433891abf184303f8849c9cbe5f7c76c226daa6e 100644 (file)
@@ -222,6 +222,7 @@ QDir Config::defaultConfigDir() {
     }
 
     if (TailsOS::detect()) {
+#ifdef SELF_CONTAINED
         QString path = []{
             QString appImagePath = qgetenv("APPIMAGE");
             if (appImagePath.isEmpty()) {
@@ -241,6 +242,11 @@ QDir Config::defaultConfigDir() {
         }();
 
         return QDir(path);
+#else
+        if (TailsOS::detectDataPersistence()) {
+            return QDir::homePath() + "/Persistent/feather_data";
+        }
+#endif
     }
 
 #if defined(Q_OS_WIN)