mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix(readonly): enable MOVE rollback when folder is read-only
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
85474628f8
commit
de546bd549
@ -201,7 +201,9 @@ void PropagateRemoteMove::slotMoveJobFinished()
|
||||
&propagator()->_anotherSyncNeeded);
|
||||
const auto filePath = propagator()->fullLocalPath(_item->_renameTarget);
|
||||
const auto filePathOriginal = propagator()->fullLocalPath(_item->_originalFile);
|
||||
const auto oldFile = QFileInfo{filePathOriginal};
|
||||
QFile file(filePath);
|
||||
auto permissionsHandler = FileSystem::FilePermissionsRestore{oldFile.absolutePath(), FileSystem::FolderPermissions::ReadWrite};
|
||||
if (!file.rename(filePathOriginal)) {
|
||||
qCWarning(lcPropagateRemoteMove) << "Could not MOVE file" << filePathOriginal << " to" << filePath
|
||||
<< " with error:" << _job->errorString() << " and failed to restore it !";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user