From ff25f940ecb7ee989bf5afa7c4899ef84f319ec5 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 30 Jan 2023 20:29:58 +0100 Subject: [PATCH] Fix URL path composition for utility methods in NextcloudFileProviderFilesUtils Signed-off-by: Claudio Cambra --- .../FileProviderExt/NextcloudFileProviderFilesUtils.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFileProviderFilesUtils.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFileProviderFilesUtils.swift index 110ee49da..eaa4ce0de 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFileProviderFilesUtils.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFileProviderFilesUtils.swift @@ -26,12 +26,12 @@ func pathForAppGroupContainer() -> URL? { func pathForFileProviderExtData() -> URL? { let containerUrl = pathForAppGroupContainer() - return containerUrl?.appendingPathExtension("FileProviderExt/") + return containerUrl?.appendingPathComponent("FileProviderExt/") } func pathForFileProviderExtFiles() -> URL? { let fileProviderDataUrl = pathForFileProviderExtData() - return fileProviderDataUrl?.appendingPathExtension("Files/") + return fileProviderDataUrl?.appendingPathComponent("Files/") } @discardableResult func localPathForNCDirectory(ocId: String) throws -> URL { @@ -39,7 +39,7 @@ func pathForFileProviderExtFiles() -> URL? { throw URLError(.badURL) } - let folderPathUrl = fileProviderFilesPathUrl.appendingPathExtension(ocId) + let folderPathUrl = fileProviderFilesPathUrl.appendingPathComponent(ocId) let folderPath = folderPathUrl.path if !FileManager.default.fileExists(atPath: folderPath) { @@ -61,7 +61,7 @@ func pathForFileProviderExtFiles() -> URL? { @discardableResult func localPathForNCFile(ocId: String, fileNameView: String) throws -> URL { let fileFolderPathUrl = try localPathForNCDirectory(ocId: ocId) - let filePathUrl = fileFolderPathUrl.appendingPathExtension(fileNameView) + let filePathUrl = fileFolderPathUrl.appendingPathComponent(fileNameView) let filePath = filePathUrl.path if !FileManager.default.fileExists(atPath: filePath) {