Commit 9205e420 authored by Luca Bacci's avatar Luca Bacci Committed by Philip Withnall
Browse files

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 gimp#4594.

ReadDirectoryChanges only needs FILE_LIST_DIRECTORY, so use that.

Fixes: gimp#4594
parent 01c5468e
......@@ -345,7 +345,7 @@ g_win32_fs_monitor_init (GWin32FSMonitorPrivate *monitor,
monitor->file_attribs = INVALID_FILE_ATTRIBUTES;
monitor->pfni_prev = NULL;
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,
NULL,
OPEN_EXISTING,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment