Present error for updating share in file provider UI
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 4 Mar 2024 17:29:39 +0000 (01:29 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:56 +0000 (16:38 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift

index 86a1398a11b4593b8d4bb3d866bb7d929cb052d2..a0f945e7e16252233088c8f521a5bbc79d441e99 100644 (file)
@@ -104,13 +104,16 @@ class ShareOptionsView: NSView {
             setAllFields(enabled: false)
             deleteButton.isEnabled = false
             saveButton.isEnabled = false
-            _ = await controller?.save(
+            let error = await controller?.save(
                 password: password,
                 expireDate: expireDate,
                 note: note,
                 label: label,
                 hideDownload: hideDownload
             )
+            if let error = error, error != .success {
+                dataSource?.uiDelegate?.showError("Error updating share: \(error.errorDescription)")
+            }
             await dataSource?.reload()
         }
     }