mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Windows shell integration: Add SHCNF_FLUSHNOWAIT to SHChangeNotify
(TortoiseSVN have this flag) Also do not call SHChangeNotify if there was no change
This commit is contained in:
parent
5a109d9293
commit
98c5871d38
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue