projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a6eecd
)
SocketAPI: If filename has a trailing slash, remove it.
author
Klaas Freitag
<freitag@owncloud.com>
Wed, 11 Mar 2015 13:09:06 +0000
(14:09 +0100)
committer
Klaas Freitag
<freitag@owncloud.com>
Wed, 11 Mar 2015 13:11:18 +0000
(14:11 +0100)
The SyncJournal stores the the names of directories without trailing slash.
src/gui/socketapi.cpp
patch
|
blob
|
history
diff --git
a/src/gui/socketapi.cpp
b/src/gui/socketapi.cpp
index 456511d0f45457cbd72c85b916f5c5d8ed704920..e9b62d95c039b2e96636026fa5025c2627aa2f43 100644
(file)
--- 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;