[Pkg-owncloud-commits] [owncloud-client] 209/332: Folderman: Fix path detection in folderForPath().
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit c4d73688a682b31774f26330390d9f9a7b2655d1
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Jul 14 15:13:28 2014 +0200
Folderman: Fix path detection in folderForPath().
---
src/mirall/folderman.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp
index 2b8523f..1c701ef 100644
--- a/src/mirall/folderman.cpp
+++ b/src/mirall/folderman.cpp
@@ -517,12 +517,12 @@ void FolderMan::addFolderDefinition(const QString& alias, const QString& sourceF
Folder *FolderMan::folderForPath(const QString &path)
{
- QString absolutePath = QDir::cleanPath(path+QLatin1Char('/'));
+ QString absolutePath = QDir::cleanPath(path)+QLatin1Char('/');
- foreach(Folder* folder, map().values())
- {
- if(absolutePath.startsWith(QDir::cleanPath(folder->path())))
- {
+ foreach(Folder* folder, this->map().values()) {
+ const QString folderPath = QDir::cleanPath(folder->path())+QLatin1Char('/');
+
+ if(absolutePath.startsWith(folderPath)) {
qDebug() << "found folder: " << folder->path() << " for " << absolutePath;
return folder;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list