diff options
author | Christian Kamm <mail@ckamm.de> | 2019-01-25 09:46:16 +0300 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-12-15 12:58:39 +0300 |
commit | 0eb406519735c2bc3825a2d7c4c617578669bc7e (patch) | |
tree | 8af33925492891cf64bd7a193e424d629214d9a2 /src/gui/folderwizard.cpp | |
parent | 41f1ddb5fc96b16efe752b04d63d545e421429cc (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/folderwizard.cpp')
-rw-r--r-- | src/gui/folderwizard.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/folderwizard.cpp b/src/gui/folderwizard.cpp index 32cfc7b61..ab109316e 100644 --- a/src/gui/folderwizard.cpp +++ b/src/gui/folderwizard.cpp @@ -449,13 +449,10 @@ bool FolderWizardRemotePath::isComplete() const if (f->accountState()->account() != _account) { continue; } - QString curDir = f->remotePath(); - if (!curDir.startsWith(QLatin1Char('/'))) { - curDir.prepend(QLatin1Char('/')); - } + QString curDir = f->remotePathTrailingSlash(); if (QDir::cleanPath(dir) == QDir::cleanPath(curDir)) { warnStrings.append(tr("This folder is already being synced.")); - } else if (dir.startsWith(curDir + QLatin1Char('/'))) { + } else if (dir.startsWith(curDir)) { warnStrings.append(tr("You are already syncing <i>%1</i>, which is a parent folder of <i>%2</i>.").arg(Utility::escape(curDir), Utility::escape(dir))); } } |