[Pkg-owncloud-commits] [owncloud-client] 174/211: SocketAPI: always clean the path and use the normal slash
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:42 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 9330d2e1e86bd909e46aa8f318429ab708061e9d
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Oct 22 15:33:35 2014 +0200
SocketAPI: always clean the path and use the normal slash
---
src/mirall/socketapi.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index d530970..f558097 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -375,7 +375,9 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, SocketType
DEBUG << "folder offline or not watched:" << argument;
statusString = QLatin1String("NOP");
} else {
- const QString file = argument.mid(syncFolder->path().length());
+
+
+ const QString file = QDir::cleanPath(argument).mid(QDir::cleanPath(syncFolder->path()).length()+1);
SyncFileStatus fileStatus = this->fileStatus(syncFolder, file, _excludes);
statusString = fileStatus.toSocketAPIString();
@@ -501,11 +503,8 @@ SyncFileStatus SocketApi::fileStatus(Folder *folder, const QString& systemFileNa
type = CSYNC_FTW_TYPE_DIR;
}
- // '\' is ignored, so convert to unix path before passing the path in.
- QString unixFileName = QDir::fromNativeSeparators(fileName);
-
// Is it excluded?
- CSYNC_EXCLUDE_TYPE excl = csync_excluded_no_ctx(excludes, unixFileName.toUtf8(), type);
+ CSYNC_EXCLUDE_TYPE excl = csync_excluded_no_ctx(excludes, fileName.toUtf8(), type);
if( excl != CSYNC_NOT_EXCLUDED ) {
return SyncFileStatus(SyncFileStatus::STATUS_IGNORE);
}
@@ -518,7 +517,7 @@ SyncFileStatus SocketApi::fileStatus(Folder *folder, const QString& systemFileNa
}
SyncFileStatus status(SyncFileStatus::STATUS_NONE);
- SyncJournalFileRecord rec = dbFileRecord_capi(folder, unixFileName );
+ SyncJournalFileRecord rec = dbFileRecord_capi(folder, fileName );
if (folder->estimateState(fileName, type, &status)) {
qDebug() << Q_FUNC_INFO << "Folder estimated status for" << fileName << "to" << status.toSocketAPIString();
--
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