From 7664509e22be82858cdae91814272449c188952e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 16 Apr 2024 18:22:53 +0800 Subject: [PATCH] Correctly set up NCKit instance with account string Signed-off-by: Claudio Cambra --- .../FileProviderExtension+ClientInterface.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift index 3d2f30a54..32302fea5 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift @@ -94,10 +94,11 @@ extension FileProviderExtension: NSFileProviderServicing { guard newNcAccount != ncAccount else { return } ncAccount = newNcAccount ncKit.setup( - user: ncAccount!.username, - userId: ncAccount!.username, - password: ncAccount!.password, - urlBase: ncAccount!.serverUrl, + account: newNcAccount.ncKitAccount, + user: newNcAccount.username, + userId: newNcAccount.username, + password: newNcAccount.password, + urlBase: newNcAccount.serverUrl, userAgent: "Nextcloud-macOS/FileProviderExt", nextcloudVersion: 25, delegate: nil) // TODO: add delegate methods for self