From 90a6d98914626795be4cc193879f610d785d871c Mon Sep 17 00:00:00 2001 From: Iva Horn Date: Mon, 13 Apr 2026 16:48:49 +0200 Subject: [PATCH] fix(macOS): Open app settings on necessity of sandbox folder migration Signed-off-by: Iva Horn --- src/gui/application.cpp | 12 ++++++++++++ src/gui/folderstatusmodel.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 7ca4f5226a355..4b6daec531ea7 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -478,6 +478,18 @@ Application::Application(int &argc, char **argv) handleEditLocallyFromOptions(); +#ifdef Q_OS_MACOS + // If any sync folder needs sandbox reapproval after upgrading to v33+, + // automatically open the settings dialog on the first affected account + // so the user is guided to grant access as quickly as possible. + for (const auto &folder : FolderMan::instance()->map()) { + if (folder->needsSandboxBookmark()) { + QTimer::singleShot(0, _gui.data(), &ownCloudGui::slotShowSettingsForSandboxReapproval); + break; + } + } +#endif + if (AccountSetupCommandLineManager::instance()->isCommandLineParsed()) { AccountSetupCommandLineManager::instance()->setupAccountFromCommandLine(); } diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 148678ace93a2..5c3504674f7bb 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -252,7 +252,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const } #ifdef Q_OS_MACOS if (folder->needsSandboxBookmark()) { - errors.prepend(tr("Select the synchronization folder to restore access.")); + errors.prepend(tr("Due to recent security improvements, the client no longer has access to the folder. Your approval is required one time to restore access. Please select the synchronization folder root.")); } #endif return errors;