Progress: Virtual file creation needs no transfer progress #6933
authorChristian Kamm <mail@ckamm.de>
Thu, 20 Dec 2018 08:45:31 +0000 (09:45 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:30 +0000 (10:58 +0100)
Treat virtual file creation as a size-less action, similar to
propagating renames or deletions.

src/libsync/progressdispatcher.h

index fc3c8238d331f392a59182643d8ebf572113219a..fdb13bbda4f40dcaafc7104764f1e9ca79d3f3af 100644 (file)
@@ -103,10 +103,13 @@ public:
     /** Return true if the size needs to be taken in account in the total amount of time */
     static inline bool isSizeDependent(const SyncFileItem &item)
     {
-        return !item.isDirectory() && (item._instruction == CSYNC_INSTRUCTION_CONFLICT
-                                         || item._instruction == CSYNC_INSTRUCTION_SYNC
-                                         || item._instruction == CSYNC_INSTRUCTION_NEW
-                                         || item._instruction == CSYNC_INSTRUCTION_TYPE_CHANGE);
+        return !item.isDirectory()
+            && (item._instruction == CSYNC_INSTRUCTION_CONFLICT
+                || item._instruction == CSYNC_INSTRUCTION_SYNC
+                || item._instruction == CSYNC_INSTRUCTION_NEW
+                || item._instruction == CSYNC_INSTRUCTION_TYPE_CHANGE)
+            && !(item._type == ItemTypeVirtualFile
+                 || item._type == ItemTypeVirtualFileDehydration);
     }
 
     /**