Discovery: Fix renaming on windows
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 2 Nov 2018 15:46:38 +0000 (16:46 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:16 +0000 (10:58 +0100)
buf.type is ItemFileSkip because csync_vio_local_stat does not set this field

src/libsync/discovery.cpp

index 505e6f725112c8c409125420c482fcb7bf0131d7..494d76c48027a0c424f1701c3b9790977d6c4ca9 100644 (file)
@@ -474,7 +474,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
                 qCInfo(lcDisco) << "Local file does not exist anymore." << originalPath;
                 return;
             }
-            if (buf.modtime != base._modtime || buf.size != base._fileSize || buf.type != ItemTypeFile) {
+            if (buf.modtime != base._modtime || buf.size != base._fileSize || buf.type == ItemTypeDirectory) {
                 qCInfo(lcDisco) << "File has changed locally, not a rename." << originalPath;
                 return;
             }