[Pkg-owncloud-commits] [owncloud-client] 68/164: SocketAPI: Append trailing slash for directories in UPDATE_VIEW.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sun Mar 22 11:56:54 UTC 2015
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 8507aba9f869888cb630fe7221d498d6edec73d2
Author: Klaas Freitag <freitag at owncloud.com>
Date: Thu Feb 26 16:40:48 2015 +0100
SocketAPI: Append trailing slash for directories in UPDATE_VIEW.
This fixes #2233
---
src/gui/socketapi.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 0560fa9..0856f2c 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -313,7 +313,14 @@ void SocketApi::slotSyncItemDiscovered(const QString &folder, const SyncFileItem
return;
}
- const QString path = f->path() + item.destination();
+ QString path = f->path() + item.destination();
+
+ // the trailing slash for directories must be appended as the filenames coming in
+ // from the plugins have that too. Otherwise the according entry item is not found
+ // in the plugin.
+ if( item._type == SyncFileItem::Type::Directory ) {
+ path += QLatin1Char('/');
+ }
const QString command = QLatin1String("SYNC");
broadcastMessage(QLatin1String("STATUS"), path, command);
@@ -386,8 +393,6 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, SocketType
DEBUG << "folder offline or not watched:" << argument;
statusString = QLatin1String("NOP");
} else {
-
-
const QString file = QDir::cleanPath(argument).mid(QDir::cleanPath(syncFolder->path()).length()+1);
SyncFileStatus fileStatus = this->fileStatus(syncFolder, file, _excludes);
--
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