From ffea7b3bb13512eb10575ab648b89aae6d7f233a Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 11 Jul 2023 10:35:34 +0200 Subject: [PATCH] fix failing tests by using FileSystem::setFileReadOnlyWeak we try to preserve complex existing permissions unless the client is required to change them significantly Signed-off-by: Matthieu Gallien --- src/libsync/propagatedownload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 9141aa7ced7bc..1e04c3bbee32a 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -1203,7 +1203,7 @@ void PropagateDownloadFile::downloadFinished() FileSystem::setFileReadOnly(filename, true); } else { qCDebug(lcPropagateDownload()) << "file is not locked: making it read write"; - FileSystem::setFileReadOnly(filename, (!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite))); + FileSystem::setFileReadOnlyWeak(filename, (!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite))); } // Apply the remote permissions @@ -1353,7 +1353,7 @@ void PropagateDownloadFile::updateMetadata(bool isConflict) FileSystem::setFileReadOnly(fn, true); } else { qCDebug(lcPropagateDownload()) << "file is not locked: making it read write"; - FileSystem::setFileReadOnly(fn, (!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite))); + FileSystem::setFileReadOnlyWeak(fn, (!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite))); } qint64 duration = _stopwatch.elapsed();