[Pkg-owncloud-commits] [owncloud-client] 411/484: [Sharing] Also add sync status to SHARE_STATUS command

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:38:14 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 fcdab1e80404570bdb3a24585e616953a3c75b25
Author: Roeland Jago Douma <rullzer at owncloud.com>
Date:   Wed Nov 25 09:40:21 2015 +0100

    [Sharing] Also add sync status to SHARE_STATUS command
---
 src/gui/socketapi.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 6dfbfd3..1f75ad5 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -435,6 +435,17 @@ void SocketApi::command_SHARE_STATUS(const QString &localFile, QIODevice *socket
         const QString message = QLatin1String("SHARE_STATUS:NOP:")+QDir::toNativeSeparators(localFile);
         sendMessage(socket, message);
     } else {
+        const QString file = QDir::cleanPath(localFile).mid(shareFolder->cleanPath().length()+1);
+        SyncFileStatus fileStatus = this->fileStatus(shareFolder, file);
+
+        // Verify the file is on the server (to our knowledge of course)
+        if (fileStatus.tag() != SyncFileStatus::STATUS_SYNC &&
+            fileStatus.tag() != SyncFileStatus::STATUS_UPDATED) {
+            const QString message = QLatin1String("SHARE_STATUS:NOTSYNCED:")+QDir::toNativeSeparators(localFile);
+            sendMessage(socket, message);
+            return;
+        }
+
         const Capabilities capabilities = shareFolder->accountState()->account()->capabilities();
 
         if (!capabilities.shareAPI()) {

-- 
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