From f89088d0ec9d440ee7e79405b1bde3f61aa74268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jefferson=20Gonz=C3=A1lez?= Date: Thu, 13 Oct 2022 00:37:52 -0400 Subject: [PATCH] dirmonitor: add watch to subdirs on file limit mode (#1155) --- data/core/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/core/init.lua b/data/core/init.lua index e72c852e..5af53ca9 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -373,6 +373,11 @@ end function core.update_project_subdir(dir, filename, expanded) assert(dir.files_limit, "function should be called only when directory is in files limit mode") dir.shown_subdir[filename] = expanded + if expanded then + dir.watch:watch(dir.name .. PATHSEP .. filename) + else + dir.watch:unwatch(dir.name .. PATHSEP .. filename) + end return refresh_directory(dir, filename) end