[Pkg-owncloud-commits] [owncloud-client] 145/211: Windows shell integration: Add SHCNF_FLUSHNOWAIT to SHChangeNotify
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:38 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 98c5871d38d58bd39e4436c6019889456b4190d0
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Tue Oct 21 14:51:18 2014 +0200
Windows shell integration: Add SHCNF_FLUSHNOWAIT to SHChangeNotify
(TortoiseSVN have this flag)
Also do not call SHChangeNotify if there was no change
---
.../windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp b/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
index b98a304..b96756d 100644
--- a/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
+++ b/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
@@ -113,10 +113,15 @@ void RemotePathChecker::workerThreadLoop()
auto state = _StrToFileState(responseStatus);
auto erased = asked.erase(responsePath);
+ bool changed = false;
{ std::unique_lock<std::mutex> lock(_mutex);
- _cache[responsePath] = state;
+ auto &it = _cache[responsePath];
+ changed = it == state;
+ it = state;
+ }
+ if (changed) {
+ SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
}
- SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH, responsePath.data(), NULL);
}
}
--
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