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

github.com/owncloud/client.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
committerckamm <mail@ckamm.de>2019-02-11 15:35:14 +0300
commitc500866a788b4423e08821bc271ff21e738d55e0 (patch)
treecb245ac560d91d713ec342f239c7eb2804d8b4d0 /src/gui/folder.h
parent63e11dc8dac716ca5f41b6dff9f9ab6c5cacfb9b (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/folder.h')
-rw-r--r--src/gui/folder.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/folder.h b/src/gui/folder.h
index 8d7877bf1..4fa7ccb85 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -57,11 +57,11 @@ public:
/// The name of the folder in the ui and internally
QString alias;
- /// path on local machine
+ /// path on local machine (always trailing /)
QString localPath;
/// path to the journal, usually relative to localPath
QString journalPath;
- /// path on remote
+ /// path on remote (usually no trailing /, exception "/")
QString targetPath;
/// whether the folder is paused
bool paused;
@@ -94,7 +94,7 @@ public:
/// Ensure / as separator and trailing /.
static QString prepareLocalPath(const QString &path);
- /// Ensure starting / and no ending /.
+ /// Remove ending /, then ensure starting '/': so "/foo/bar" and "/".
static QString prepareTargetPath(const QString &path);
/// journalPath relative to localPath.
@@ -152,10 +152,15 @@ public:
QString cleanPath() const;
/**
- * remote folder path
+ * remote folder path, usually without trailing /, exception "/"
*/
QString remotePath() const;
+ /**
+ * remote folder path, always with a trailing /
+ */
+ QString remotePathTrailingSlash() const;
+
void setNavigationPaneClsid(const QUuid &clsid) { _definition.navigationPaneClsid = clsid; }
QUuid navigationPaneClsid() const { return _definition.navigationPaneClsid; }