Allow deletion of virtual suffix placeholder files
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 17 Jun 2024 15:40:28 +0000 (23:40 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 28 Jun 2024 16:18:01 +0000 (16:18 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/discovery.cpp

index 858e1b207d9a23925ceca50b093267f3886ba6ca..7b6b93bb1c81226f1cd4694d1c11c7752147c2f9 100644 (file)
@@ -1082,14 +1082,6 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
                 qCWarning(lcDisco) << "Failed to delete a file record from the local DB" << path._original;
             }
             return;
-        } else if (dbEntry._type == ItemTypeVirtualFile && isVfsWithSuffix()) {
-            // If the virtual file is removed, recreate it.
-            // This is a precaution since the suffix files don't look like the real ones
-            // and we don't want users to accidentally delete server data because they
-            // might not expect that deleting the placeholder will have a remote effect.
-            item->_instruction = CSYNC_INSTRUCTION_NEW;
-            item->_direction = SyncFileItem::Down;
-            item->_type = ItemTypeVirtualFile;
         } else if (!serverModified) {
             // Removed locally: also remove on the server.
             if (!dbEntry._serverHasIgnoredFiles) {