Skip to content

Commit 0b5b8aa

Browse files
mgallienbackportbot[bot]
authored andcommitted
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 <[email protected]>
1 parent 463114e commit 0b5b8aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsync/propagatorjobs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void PropagateLocalRemove::start()
118118

119119
QString removeError;
120120
const auto availability = propagator()->syncOptions()._vfs->availability(_item->_file, Vfs::AvailabilityRecursivity::RecursiveAvailability);
121-
if (_moveToTrash && (!availability || (*availability != VfsItemAvailability::AllDehydrated && *availability != VfsItemAvailability::OnlineOnly && *availability != VfsItemAvailability::Mixed))) {
121+
if (_moveToTrash && propagator()->syncOptions()._vfs->mode() != OCC::Vfs::WindowsCfApi) {
122122
if ((QDir(filename).exists() || FileSystem::fileExists(filename))
123123
&& !FileSystem::moveToTrash(filename, &removeError)) {
124124
done(SyncFileItem::NormalError, removeError, ErrorCategory::GenericError);

0 commit comments

Comments
 (0)