From 77c0adf0fa26af163d137cf2d4a914e87feb9206 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Sep 2025 14:28:02 +0000 Subject: [PATCH 1/2] Initial plan From a0a7d68818338592d98d9883d850cc1b9f921ac1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Sep 2025 14:33:21 +0000 Subject: [PATCH 2/2] fix: change default trash deletion setting from true to false Co-authored-by: Rello <13385119+Rello@users.noreply.github.com> --- .../FileProviderExt/FileProviderConfig.swift | 2 +- src/gui/macOS/fileprovidersettingscontroller_mac.mm | 4 ++-- src/gui/macOS/fileproviderxpc_mac.mm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift index a273aacad9887..506a48990f44d 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift @@ -33,7 +33,7 @@ struct FileProviderConfig { } var trashDeletionEnabled: Bool { - get { internalConfig[ConfigKey.trashDeletionEnabled.rawValue] as? Bool ?? true } + get { internalConfig[ConfigKey.trashDeletionEnabled.rawValue] as? Bool ?? false } set { internalConfig[ConfigKey.trashDeletionEnabled.rawValue] = newValue } } diff --git a/src/gui/macOS/fileprovidersettingscontroller_mac.mm b/src/gui/macOS/fileprovidersettingscontroller_mac.mm index bf84c557fcbfa..75ae14bcd22c9 100644 --- a/src/gui/macOS/fileprovidersettingscontroller_mac.mm +++ b/src/gui/macOS/fileprovidersettingscontroller_mac.mm @@ -378,12 +378,12 @@ void initialCheck() { const auto xpc = FileProvider::instance()->xpc(); if (!xpc) { - return true; + return false; } if (const auto trashDeletionState = xpc->trashDeletionEnabledStateForExtension(userIdAtHost)) { return trashDeletionState->first; } - return true; + return false; } bool FileProviderSettingsController::trashDeletionSetForAccount(const QString &userIdAtHost) const diff --git a/src/gui/macOS/fileproviderxpc_mac.mm b/src/gui/macOS/fileproviderxpc_mac.mm index 1239b2db3984c..4436c064e41b9 100644 --- a/src/gui/macOS/fileproviderxpc_mac.mm +++ b/src/gui/macOS/fileproviderxpc_mac.mm @@ -216,7 +216,7 @@ return std::nullopt; } - __block BOOL receivedTrashDeletionEnabled = YES; // What is the value of the setting being used by the extension? + __block BOOL receivedTrashDeletionEnabled = NO; // What is the value of the setting being used by the extension? __block BOOL receivedTrashDeletionEnabledSet = NO; // Has the setting been set by the user? __block BOOL receivedResponse = NO; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);