mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Use the right permissions for directory watching on Win32
Using FILE_GENERIC_READ | FILE_GENERIC_WRITE access rights for directory monitoring might cause problems, as noted in https://gitlab.gnome.org/GNOME/gimp/-/issues/4594. ReadDirectoryChanges only needs FILE_LIST_DIRECTORY, so use that. Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/4594
This commit is contained in:
parent
d799d27808
commit
00e848fbc3
@ -345,7 +345,7 @@ g_win32_fs_monitor_init (GWin32FSMonitorPrivate *monitor,
|
|||||||
monitor->file_attribs = INVALID_FILE_ATTRIBUTES;
|
monitor->file_attribs = INVALID_FILE_ATTRIBUTES;
|
||||||
monitor->pfni_prev = NULL;
|
monitor->pfni_prev = NULL;
|
||||||
monitor->hDirectory = CreateFileW (wdirname_with_long_prefix != NULL ? wdirname_with_long_prefix : monitor->wfullpath_with_long_prefix,
|
monitor->hDirectory = CreateFileW (wdirname_with_long_prefix != NULL ? wdirname_with_long_prefix : monitor->wfullpath_with_long_prefix,
|
||||||
FILE_GENERIC_READ | FILE_GENERIC_WRITE,
|
FILE_LIST_DIRECTORY,
|
||||||
FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
NULL,
|
NULL,
|
||||||
OPEN_EXISTING,
|
OPEN_EXISTING,
|
||||||
|
Loading…
Reference in New Issue
Block a user