From bf578d5ee4485f79a40b2507fece8227c46fa730 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Mon, 3 Jan 2022 18:50:43 +0100 Subject: [PATCH] Fix logic for file create event When we get a file or directory creation event we need to ensure that all the parent directories pass the ignore_files test. --- data/core/init.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data/core/init.lua b/data/core/init.lua index 5d51c4cb..4074043e 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -582,8 +582,16 @@ end local function project_scan_add_file(dir, filepath) local fileinfo = get_project_file_info(dir.name, PATHSEP .. filepath) - if not fileinfo or not fileinfo_pass_filter(fileinfo) then return end - project_scan_add_entry(dir, fileinfo) + if fileinfo then + repeat + filepath = common.dirname(filepath) + local parent_info = filepath and get_project_file_info(dir.name, PATHSEP .. filepath) + if filepath and not parent_info then + return + end + until not parent_info + project_scan_add_entry(dir, fileinfo) + end end