Skip to content

Commit

Permalink
prevent implicit hydration when checking PIN state
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mgallien committed Jan 3, 2025
1 parent f12f66f commit 6f8a40f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/propagatorjobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6f8a40f

Please sign in to comment.