From d64f153e0b21afb1958838a693a6b853a861af51 Mon Sep 17 00:00:00 2001 From: Thomas Wilshaw Date: Wed, 9 Mar 2022 13:41:13 +0000 Subject: [PATCH] filefunctions: change permissions to allow deleting --- app/common/filefunctions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/common/filefunctions.cpp b/app/common/filefunctions.cpp index 5c36ea0c7..24de67db0 100644 --- a/app/common/filefunctions.cpp +++ b/app/common/filefunctions.cpp @@ -139,7 +139,10 @@ void FileFunctions::CopyDirectory(const QString &source, const QString &dest, bo } else { // Copy file if (overwrite && QFile::exists(dest_file_path)) { - QFile::remove(dest_file_path); + QFile file(dest_file_path); + file.setPermissions(file.permissions() | QFileDevice::WriteOwner | QFileDevice::WriteUser | + QFileDevice::WriteGroup | QFileDevice::WriteOther); + file.remove(); } QFile::copy(info.absoluteFilePath(), dest_file_path);