From 9086f09fe2732a0a604bcd85726d6e719e73b4e5 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 11 Mar 2015 14:09:06 +0100 Subject: [PATCH] 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 456511d0f..e9b62d95c 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;