Avoid blocking SHChangeNotify call in CreateOrUpdateShortcutLink
Avoid blocking call to SHChangeNotify in CreateOrUpdateShortcutLink by replacing SHCNF_FLUSH with SHCNF_FLUSHNOWAIT. The former lead to long hangs in communication with the windows shell. Bug: 1502607 Change-Id: Iff65fe026db4600e89811c59aa871ea051f52a9f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5033903 Reviewed-by: David Bienvenu <davidbienvenu@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Commit-Queue: Chris Davis <chrdavis@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1225207}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
4be3fe7ad3
commit
0cf94e43f7
@@ -204,7 +204,7 @@ bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
|
||||
return false;
|
||||
|
||||
SHChangeNotify(shortcut_existed ? SHCNE_UPDATEITEM : SHCNE_CREATE,
|
||||
SHCNF_PATH | SHCNF_FLUSH, shortcut_path.value().c_str(),
|
||||
SHCNF_PATH | SHCNF_FLUSHNOWAIT, shortcut_path.value().c_str(),
|
||||
nullptr);
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user