update mtime on modified metdata of non virtual files
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 18 Nov 2022 14:32:07 +0000 (15:32 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 22 Nov 2022 14:08:46 +0000 (15:08 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/syncengine.cpp

index 1f046c15d8dc0c3ad8268fc3f5ca3ac44b0b216b..d1cbd438f3d929af8514ea1119b0a6d5dc7d25ad 100644 (file)
@@ -377,6 +377,13 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item)
                     emit itemCompleted(item);
                     return;
                 }
+            } else {
+                if (!FileSystem::setModTime(filePath, item->_modtime)) {
+                    item->_instruction = CSYNC_INSTRUCTION_ERROR;
+                    item->_errorString = tr("Could not update file metadata: %1").arg(filePath);
+                    emit itemCompleted(item);
+                    return;
+                }
             }
 
             // Updating the db happens on success