projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48a0ffd
)
PropagateLocalRemove: Make it possible to remove read only files (#4277)
author
Olivier Goffart
<ogoffart@woboq.com>
Mon, 21 Dec 2015 12:25:10 +0000
(13:25 +0100)
committer
Olivier Goffart
<ogoffart@woboq.com>
Mon, 21 Dec 2015 12:25:10 +0000
(13:25 +0100)
src/libsync/propagatorjobs.cpp
patch
|
blob
|
history
diff --git
a/src/libsync/propagatorjobs.cpp
b/src/libsync/propagatorjobs.cpp
index 404f6238b1715efd145cc50fa0e38c747862fa05..e17ab60175219110f6ad69b665c6a481ee79b05d 100644
(file)
--- a/
src/libsync/propagatorjobs.cpp
+++ b/
src/libsync/propagatorjobs.cpp
@@
-66,6
+66,12
@@
bool PropagateLocalRemove::removeRecursively(const QString& path)
if (isDir) {
ok = removeRecursively(path + QLatin1Char('/') + di.fileName()); // recursive
} else {
+#ifdef Q_OS_WIN
+ // On Windows, write only files cannot be deleted. (#4277)
+ if (!di.fileInfo().isWritable()) {
+ FileSystem::setFileReadOnlyWeak(di.filePath(),false);
+ }
+#endif
QFile f(di.filePath());
ok = f.remove();
if (!ok) {