Ensure we do not set etag if we have set updateDirectoryEtags to false in NextcloudFi...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Sat, 18 Mar 2023 18:00:25 +0000 (19:00 +0100)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 12 May 2023 05:29:57 +0000 (13:29 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Database/NextcloudFilesDatabaseManager.swift

index a36f1b766d36e31aae9e0d68833f08743c60b209..ee44645a4b5e376c5e1b2cf91ca763ecf4d2d223 100644 (file)
@@ -166,6 +166,10 @@ class NextcloudFilesDatabaseManager : NSObject {
                 }
 
             } else { // This is a new metadata
+                if !updateDirectoryEtags {
+                    updatedMetadata.etag = ""
+                }
+                
                 returningNewMetadatas.append(updatedMetadata)
 
                 Logger.ncFilesDatabase.debug("Created new item metadata during update. ocID: \(updatedMetadata.ocId, privacy: .public), etag: \(updatedMetadata.etag, privacy: .public), fileName: \(updatedMetadata.fileName, privacy: OSLogPrivacy.auto(mask: .hash))")