Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2019-01-25 09:46:16 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:58:39 +0300
commit0eb406519735c2bc3825a2d7c4c617578669bc7e (patch)
tree8af33925492891cf64bd7a193e424d629214d9a2 /src/gui/sharemanager.cpp
parent41f1ddb5fc96b16efe752b04d63d545e421429cc (diff)
Folder: Add remoteFolderTrailingSlash()
There were cases where the "/" exception wasn't handled correctly and there'd be extra slashes in generated paths.
Diffstat (limited to 'src/gui/sharemanager.cpp')
-rw-r--r--src/gui/sharemanager.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/sharemanager.cpp b/src/gui/sharemanager.cpp
index 87df91350..ed1eea9cc 100644
--- a/src/gui/sharemanager.cpp
+++ b/src/gui/sharemanager.cpp
@@ -37,9 +37,7 @@ static void updateFolder(const AccountPtr &account, const QString &path)
if (path.startsWith(folderPath) && (path == folderPath || folderPath.endsWith('/') || path[folderPath.size()] == '/')) {
// Workaround the fact that the server does not invalidate the etags of parent directories
// when something is shared.
- auto relative = path.midRef(folderPath.size());
- if (relative.startsWith('/'))
- relative = relative.mid(1);
+ auto relative = path.midRef(f->remotePathTrailingSlash().length());
f->journalDb()->avoidReadFromDbOnNextSync(relative.toString());
// Schedule a sync so it can update the remote permission flag and let the socket API