Allow deletion of virtual suffix placeholder files

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-06-17 23:40:28 +08:00 committed by Matthieu Gallien
parent f44eb5b8d4
commit b00a5934c9

View File

@ -1085,14 +1085,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) {