]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Tails: persist desktop entry
authortobtoht <tob@featherwallet.org>
Tue, 18 Mar 2025 10:55:19 +0000 (11:55 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 18 Mar 2025 12:53:19 +0000 (13:53 +0100)
src/utils/Utils.cpp

index 72322ba964057afc229ba9da83cf36e8afe3fc0e..bd1bef99bf593d3c38b5c2fbe22a10974d182166 100644 (file)
@@ -333,12 +333,23 @@ bool xdgDesktopEntryRegister() {
 #endif
 
     QPixmap appIcon(":assets/images/appicons/64x64.png");
-    QString pathIcon = QString("%1/.local/share/icons/feather.png").arg(QDir::homePath());
-    if (!fileExists(pathIcon)) {
-        pixmapWrite(pathIcon, appIcon);
+    QString iconPathSuffix = "%1/.local/share/icons/feather.png";
+    QString iconPath = iconPathSuffix.arg(QDir::homePath());
+    if (!fileExists(iconPath)) {
+        pixmapWrite(iconPath, appIcon);
     }
     xdgDesktopEntryWrite(QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/feather-wallet.desktop");
 
+    // Also write to dotfiles persistence
+    if (TailsOS::detect() && TailsOS::detectDotPersistence()) {
+        QString basePath = "/live/persistence/TailsData_unlocked/dotfiles";
+        iconPath = iconPathSuffix.arg(basePath);
+        if (!fileExists(iconPath)) {
+            pixmapWrite(iconPath, appIcon);
+        }
+        xdgDesktopEntryWrite(basePath + "/.local/share/applications/feather-wallet.desktop");
+    }
+
     xdgRefreshApplications();
     return true;
 }