[Pkg-owncloud-commits] [owncloud-client] 37/171: PropagateLocalRemove: Make it possible to remove read only files (#4277)

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Feb 17 09:36:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.

commit 11174ddf4cb3283548dd0fa13ca5c45a02c3e224
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Dec 21 13:25:10 2015 +0100

    PropagateLocalRemove: Make it possible to remove read only files (#4277)
---
 src/libsync/propagatorjobs.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp
index 404f623..e17ab60 100644
--- 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list