From f60121e2c8d00c13b4a7ea00121ea76420462e55 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Wed, 27 Jan 2021 19:03:30 -0800 Subject: [PATCH] Fixed fileWatcher on linux, so that it also triggers on IN_ATTRIB --- microscript/ILibDuktape_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microscript/ILibDuktape_fs.c b/microscript/ILibDuktape_fs.c index 9374350..47bf2be 100644 --- a/microscript/ILibDuktape_fs.c +++ b/microscript/ILibDuktape_fs.c @@ -2099,7 +2099,7 @@ duk_ret_t ILibDuktape_fs_watch(duk_context *ctx) } ILibChain_AddWaitHandle(data->chain, data->overlapped.hEvent, -1, ILibDuktape_fs_watch_iocompletion, data); #elif defined(_POSIX) && !defined(__APPLE__) && !defined(_FREEBSD) - data->wd.i = inotify_add_watch(data->linuxWatcher->fd, path, IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO); + data->wd.i = inotify_add_watch(data->linuxWatcher->fd, path, IN_ATTRIB | IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO); if (data->wd.i < 0) { ILibRemoteLogging_printf(ILibChainGetLogger(chain), ILibRemoteLogging_Modules_Agent_GuardPost | ILibRemoteLogging_Modules_ConsolePrint, ILibRemoteLogging_Flags_VerbosityLevel_1, "fs.watch(): Error setting watch on [%s] errno = %d", path, errno);