[Pkg-owncloud-commits] [owncloud-client] 39/69: Windows Overlay: Use FLUSHNOW everywhere to speed up updates

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Nov 7 19:41:09 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 c34c8ff3583e44bf9d120f0b3d43e7174d4174fd
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Mon Nov 3 20:45:38 2014 +0100

    Windows Overlay: Use FLUSHNOW everywhere to speed up updates
---
 .../OCShellExtensions/OCUtil/RemotePathChecker.cpp | 27 ++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp b/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
index 92da20e..239075c 100644
--- a/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
+++ b/shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.cpp
@@ -16,6 +16,8 @@
 #include "RemotePathChecker.h"
 #include "StringUtil.h"
 
+#include <shlobj.h>
+
 #include <algorithm>
 #include <iostream>
 #include <sstream>
@@ -77,7 +79,7 @@ void RemotePathChecker::workerThreadLoop()
 				{   std::unique_lock<std::mutex> lock(_mutex);
 					_watchedDirectories.push_back(responsePath);
 				}
-				SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH, responsePath.data(), NULL);
+				SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
 			} else if (StringUtil::begins_with(response, wstring(L"UNREGISTER_PATH:"))) {
                 wstring responsePath = response.substr(16); // length of UNREGISTER_PATH:
 
@@ -95,7 +97,7 @@ void RemotePathChecker::workerThreadLoop()
                         }
                     }
                 }
-                SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH, responsePath.data(), NULL);
+				SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
             } else if (StringUtil::begins_with(response, wstring(L"STATUS:")) ||
                     StringUtil::begins_with(response, wstring(L"BROADCAST:"))) {
 
@@ -122,16 +124,17 @@ void RemotePathChecker::workerThreadLoop()
                 if (changed) {
                     SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
                 }
-            }
-        } else if (StringUtil::begins_with(response, wstring(L"UPDATE_VIEW"))) {
-            std::unique_lock<std::mutex> lock(_mutex);
-            // Request a status for all the items in the cache.
-            for (auto it = _cache.begin(); it != _cache.end() ; ++it ) {
-                if (!socket.SendMsg(wstring(L"RETRIEVE_FILE_STATUS:" + it->first + L'\n').data())) {
-                    break;
-                }
-            }
-        }
+			}
+			else if (StringUtil::begins_with(response, wstring(L"UPDATE_VIEW"))) {
+				std::unique_lock<std::mutex> lock(_mutex);
+				// Request a status for all the items in the cache.
+				for (auto it = _cache.begin(); it != _cache.end(); ++it) {
+					if (!socket.SendMsg(wstring(L"RETRIEVE_FILE_STATUS:" + it->first + L'\n').data())) {
+						break;
+					}
+				}
+			}
+		}
 
 		if (socket.Event() == INVALID_HANDLE_VALUE) {
 			std::unique_lock<std::mutex> lock(_mutex);

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