[Pkg-owncloud-commits] [owncloud-client] 53/83: Case clash check for local remove plus native separators.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat May 31 11:31:43 UTC 2014


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

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 6017eb7ca69a22ce5580b7b0bf4fc03c36ca5a63
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon May 26 18:17:18 2014 +0200

    Case clash check for local remove plus native separators.
---
 src/mirall/propagatorjobs.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/mirall/propagatorjobs.cpp b/src/mirall/propagatorjobs.cpp
index f613e7e..3f823fe 100644
--- a/src/mirall/propagatorjobs.cpp
+++ b/src/mirall/propagatorjobs.cpp
@@ -76,9 +76,16 @@ void PropagateLocalRemove::start()
         return;
 
     QString filename = _propagator->_localDir +  _item._file;
+    if( _propagator->localFileNameClash(_item._file)) {
+        done(SyncFileItem::NormalError, tr("Could not remove %1 because of a local file name clash")
+             .arg(QDir::toNativeSeparators(filename)));
+        return;
+    }
+
     if (_item._isDirectory) {
         if (QDir(filename).exists() && !removeRecursively(filename)) {
-            done(SyncFileItem::NormalError, tr("Could not remove directory %1").arg(filename));
+            done(SyncFileItem::NormalError, tr("Could not remove directory %1")
+                 .arg(QDir::toNativeSeparators(filename)));
             return;
         }
     } else {
@@ -187,7 +194,7 @@ void PropagateLocalRename::start()
             // Fixme: the file that is the reason for the clash could be named here,
             // it would have to come out the localFileNameClash function
             done(SyncFileItem::NormalError, tr( "File %1 can not be renamed to %2 because of a local file name clash")
-                 .arg(_item._file).arg(_item._renameTarget) );
+                 .arg(QDir::toNativeSeparators(_item._file)).arg(QDir::toNativeSeparators(_item._renameTarget)) );
             return;
         }
         if (!file.rename(_propagator->_localDir + _item._file, _propagator->_localDir + _item._renameTarget)) {

-- 
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