]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
windowmanager: improve error message if cache file can't be read
authortobtoht <tob@featherwallet.org>
Sun, 6 Oct 2024 21:47:41 +0000 (23:47 +0200)
committertobtoht <tob@featherwallet.org>
Sun, 6 Oct 2024 21:47:41 +0000 (23:47 +0200)
monero
src/WindowManager.cpp

diff --git a/monero b/monero
index ed8e0d19519f7fe50d0a8acc203e7d39c2aefbbc..55a6b0018bb61abb9985a3054837d48f4d1020d8 160000 (submodule)
--- a/monero
+++ b/monero
@@ -1 +1 @@
-Subproject commit ed8e0d19519f7fe50d0a8acc203e7d39c2aefbbc
+Subproject commit 55a6b0018bb61abb9985a3054837d48f4d1020d8
index dbd022a2b644ba1c75f9ee8e172f9b3d1ce0f66b..a34eae9c955fa0ffc82d59e3607611d27c68c052 100644 (file)
@@ -290,7 +290,16 @@ void WindowManager::onWalletOpened(Wallet *wallet) {
             WalletManager::clearWalletCache(wallet->cachePath());
             errMsg = QString("%1\n\nWallet cache is unusable, moving it.").arg(errMsg);
             this->handleWalletError({nullptr, Utils::ERROR, "Unable to open wallet", errMsg, {"Try opening this wallet again.", "If this keeps happening, please file a bug report."}, "report_an_issue"});
-        } else {
+        }
+        else if (errMsg.startsWith("failed to read file")) {
+#if defined(Q_OS_MACOS)
+            Utils::Message message{nullptr, Utils::ERROR, "Unable to open wallet", errMsg, {"You may need to give Feather permission to access the folder", "In the System Settings app, go to 'Privacy & Security' -> 'Files & Folders'"}};
+#else
+            Utils::Message message{nullptr, Utils::ERROR, "Unable to open wallet", errMsg, {"You may need to change the permissions on the wallet directory."}};
+#endif
+            this->handleWalletError(message);
+        }
+        else {
             Utils::Message message{nullptr, Utils::ERROR, "Unable to open wallet"};
             this->handleDeviceError(errMsg, message);
             this->handleWalletError(message);