mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #7909 from nextcloud/backport/7908/stable-3.16
[stable-3.16] Bugfix/delete read only remnants
This commit is contained in:
commit
620f55e89e
@ -1736,7 +1736,16 @@ void Folder::slotNeedToRemoveRemnantsReadOnlyFolders(const QList<SyncFileItemPtr
|
||||
|
||||
setSyncPaused(true);
|
||||
for(const auto &oneFolder : folders) {
|
||||
FileSystem::removeRecursively(localPath + oneFolder->_file);
|
||||
#if !defined(Q_OS_MACOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15
|
||||
const auto fileInfo = QFileInfo{localPath + oneFolder->_file};
|
||||
const auto parentFolderPath = fileInfo.dir().absolutePath();
|
||||
const auto parentPermissionsHandler = FileSystem::FilePermissionsRestore{parentFolderPath, FileSystem::FolderPermissions::ReadWrite};
|
||||
#endif
|
||||
if (oneFolder->_type == ItemType::ItemTypeDirectory) {
|
||||
FileSystem::removeRecursively(localPath + oneFolder->_file);
|
||||
} else {
|
||||
FileSystem::remove(localPath + oneFolder->_file);
|
||||
}
|
||||
}
|
||||
callback(true);
|
||||
setSyncPaused(false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user