[Pkg-owncloud-commits] [owncloud-client] 317/332: SyncEngine: fix permission detection of moves
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:17 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 21783ecef7bde6a9d286b49161e5163f8eb6b5fd
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Aug 7 14:27:27 2014 +0200
SyncEngine: fix permission detection of moves
Two problems:
- "M" was used instead of "V"
- The extraction of the parent folder of the destination was wrong
---
src/mirall/syncengine.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index c68be74..aef43e9 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -846,7 +846,7 @@ void SyncEngine::checkForPermission()
case CSYNC_INSTRUCTION_RENAME: {
int slashPos = it->_renameTarget.lastIndexOf('/');
- const QString parentDir = slashPos <= 0 ? "" : it->_renameTarget.mid(0, slashPos-1);
+ const QString parentDir = slashPos <= 0 ? "" : it->_renameTarget.mid(0, slashPos);
const QByteArray destPerms = getPermissions(parentDir);
const QByteArray filePerms = getPermissions(it->_file);
@@ -869,7 +869,7 @@ void SyncEngine::checkForPermission()
bool sourceOK = true;
if (!filePerms.isNull()
&& ((isRename && !filePerms.contains("N"))
- || (!isRename && !filePerms.contains("M")))) {
+ || (!isRename && !filePerms.contains("V")))) {
// We are not allowed to move or rename this file
sourceOK = false;
--
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