SocketAPI: If filename has a trailing slash, remove it.

The SyncJournal stores the the names of directories without trailing slash.
This commit is contained in:
Klaas Freitag 2015-03-11 14:09:06 +01:00
parent 5a6eecd694
commit 9086f09fe2

View file

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