From 9f3cbac23f0200b43212798009c5acbd038bb1e3 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 15 Jul 2017 07:48:47 +0000 Subject: [PATCH] [SHELL32] In case a FSD doesn't support directory changes notifications, don't try to requeue a notification each time it returns 0 data. Just quit instead. CORE-13549 svn path=/trunk/; revision=75349 --- reactos/dll/win32/shell32/wine/changenotify.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reactos/dll/win32/shell32/wine/changenotify.c b/reactos/dll/win32/shell32/wine/changenotify.c index 7846497184a..e75fb7cf234 100644 --- a/reactos/dll/win32/shell32/wine/changenotify.c +++ b/reactos/dll/win32/shell32/wine/changenotify.c @@ -735,6 +735,15 @@ _NotificationCompletion(DWORD dwErrorCode, // completion code { InterlockedIncrement(&item->pParent->wQueuedCount); } + + /* If the FSD doesn't support directory change notifications, there's no + * no need to retry and requeue notification + */ + if (dwErrorCode == ERROR_INVALID_FUNCTION) + { + WARN("Directory watching not supported\n"); + goto quit; + } #endif /* This likely means overflow, so force whole directory refresh. */