From be0d7f4cbeac0875268ad913c9819c5a7cbc5f22 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 3 Jan 2025 15:34:07 +0100 Subject: [PATCH] prevent implicit hydration when checking PIN state to enable move to trash, we check availability of a folder recursively that will trigger implicit hydration of its content we will now prevent moving to trash for VFS CfApi native VFS on Windows will fix teh bug and probably be much more robust and reliable Signed-off-by: Matthieu Gallien --- src/libsync/propagatorjobs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp index 6d1bb1b6fddcf..99e69719dac23 100644 --- a/src/libsync/propagatorjobs.cpp +++ b/src/libsync/propagatorjobs.cpp @@ -118,7 +118,7 @@ void PropagateLocalRemove::start() QString removeError; const auto availability = propagator()->syncOptions()._vfs->availability(_item->_file, Vfs::AvailabilityRecursivity::RecursiveAvailability); - if (_moveToTrash && (!availability || (*availability != VfsItemAvailability::AllDehydrated && *availability != VfsItemAvailability::OnlineOnly && *availability != VfsItemAvailability::Mixed))) { + if (_moveToTrash && propagator()->syncOptions()._vfs->mode() != OCC::Vfs::WindowsCfApi) { if ((QDir(filename).exists() || FileSystem::fileExists(filename)) && !FileSystem::moveToTrash(filename, &removeError)) { done(SyncFileItem::NormalError, removeError, ErrorCategory::GenericError);