From ce95959c1d7a12866b6f10dcd0a467b346fbb283 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 24 Mar 2025 09:55:29 +0100 Subject: [PATCH] tails: write to persistent storage for system packages --- src/utils/Utils.cpp | 6 ++++++ src/utils/config.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index bd1bef99..b1255923 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -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) diff --git a/src/utils/config.cpp b/src/utils/config.cpp index adaec28a..433891ab 100644 --- a/src/utils/config.cpp +++ b/src/utils/config.cpp @@ -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) -- 2.52.0