[Pkg-owncloud-commits] [owncloud-client] 297/332: SocketAPI: Convert to unix path before comparing with black list

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:14 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 839b2fa8fdf3279094dc74a5ddad480b6f6a7b14
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Tue Aug 5 13:11:52 2014 +0200

    SocketAPI: Convert to unix path before comparing with black list
---
 src/mirall/socketapi.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 88cd683..65ba23c 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -140,14 +140,16 @@ SyncFileStatus fileStatus(Folder *folder, const QString& systemFileName )
         type = CSYNC_FTW_TYPE_DIR;
     }
 
-    CSYNC_EXCLUDE_TYPE excl = csync_excluded(folder->csyncContext(), fileName.toUtf8(), type);
+    // '\' is ignored, so convert to unix path before passing the path in.
+    QString unixFileName = QDir::fromNativeSeparators(fileName);
+    CSYNC_EXCLUDE_TYPE excl = csync_excluded(folder->csyncContext(), unixFileName.toUtf8(), type);
     if( excl != CSYNC_NOT_EXCLUDED ) {
         return SyncFileStatus(SyncFileStatus::STATUS_IGNORE);
     }
 
     // Problem: for the sync dir itself we do not have a record in the sync journal
     // so the next check must not be used for the sync root folder.
-    SyncJournalFileRecord rec = folder->journalDb()->getFileRecord(fileName);
+    SyncJournalFileRecord rec = folder->journalDb()->getFileRecord(unixFileName);
     if( !isSyncRootFolder && !rec.isValid() ) {
         return SyncFileStatus(SyncFileStatus::STATUS_NEW);
     }

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