[Pkg-owncloud-commits] [owncloud-client] 124/164: SocketAPI: If filename has a trailing slash, remove it.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Mar 22 11:57:02 UTC 2015


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 9086f09fe2732a0a604bcd85726d6e719e73b4e5
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Mar 11 14:09:06 2015 +0100

    SocketAPI: If filename has a trailing slash, remove it.
    
    The SyncJournal stores the the names of directories without trailing slash.
---
 src/gui/socketapi.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 456511d..e9b62d9 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -491,6 +491,10 @@ SyncJournalFileRecord SocketApi::dbFileRecord_capi( Folder *folder, QString file
         fileName.remove(0, folder->path().length());
     }
 
+    // remove trailing slash
+    if( fileName.endsWith( QLatin1Char('/') ) ) {
+        fileName.truncate(fileName.length()-1);
+    }
     SqlQuery *query = getSqlQuery(folder);
     SyncJournalFileRecord rec;
 

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