mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
always make the file we try to delete be read-write as required
on windows you must only delete read-write files Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
a9293fd25b
commit
ca34d86efb
@ -586,9 +586,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString)
|
||||
#ifdef Q_OS_WIN
|
||||
// You cannot delete a read-only file on windows, but we want to
|
||||
// allow that.
|
||||
if (!isWritable(fileName)) {
|
||||
setFileReadOnly(fileName, false);
|
||||
}
|
||||
setFileReadOnly(fileName, false);
|
||||
#endif
|
||||
QFile f(fileName);
|
||||
if (!f.remove()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user