dirmonitor: add watch to subdirs on file limit mode (#1155)

This commit is contained in:
Jefferson González
2022-10-13 00:37:52 -04:00
committed by GitHub
parent fb8bc08a67
commit f89088d0ec
+5
View File
@@ -373,6 +373,11 @@ end
function core.update_project_subdir(dir, filename, expanded) function core.update_project_subdir(dir, filename, expanded)
assert(dir.files_limit, "function should be called only when directory is in files limit mode") assert(dir.files_limit, "function should be called only when directory is in files limit mode")
dir.shown_subdir[filename] = expanded 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) return refresh_directory(dir, filename)
end end