From 0265eed2a2f3dc759795ebde98f5f813b2def116 Mon Sep 17 00:00:00 2001 From: alex-z Date: Wed, 15 Nov 2023 21:35:16 +0100 Subject: [PATCH] Refactoring. Signed-off-by: alex-z --- src/libsync/propagateremotemove.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libsync/propagateremotemove.cpp b/src/libsync/propagateremotemove.cpp index 216cc7bf1278..a52f3f75e62f 100644 --- a/src/libsync/propagateremotemove.cpp +++ b/src/libsync/propagateremotemove.cpp @@ -314,10 +314,9 @@ void PropagateRemoteMove::finalize() return; } - int a = 5; - a = 6; - if (vfs->mode() != Vfs::Off && vfs->mode() != Vfs::WindowsCfApi) { + // the following slow code is only useful for VFS with suffix which is used for TestSyncVirtualFiles::testPinStateLocals test case + // TODO: Get rid of the TestSyncVirtualFiles::testPinStateLocals or change it, native Virtual Files (e.g. CfAPI do not need this code as pinstate is moved with corresponding placeholder) if (!propagator()->_journal->getFilesBelowPath(_item->_renameTarget.toUtf8(), [&](const SyncJournalFileRecord &rec) { // not sure if this is needed, inode seems to never change for move/rename auto newItem = SyncFileItem::fromSyncJournalFileRecord(rec); @@ -371,7 +370,6 @@ void PropagateRemoteMove::finalize() qCWarning(lcPropagateRemoteMove) << "Could not update inode for moved files in" << _item->_renameTarget; } } - a = 7; } propagator()->_journal->commit("Remote Rename");