diff options
| author | Francesco Abbate <francesco.bbt@gmail.com> | 2022-01-03 18:50:43 +0100 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2022-01-03 18:55:01 +0100 |
| commit | bf578d5ee4485f79a40b2507fece8227c46fa730 (patch) | |
| tree | 5c9a05911b8ec2e06033b6db300c408c9167431b | |
| parent | 445c79bb52120fa874dbc711aa1d4390c4d02848 (diff) | |
| download | lite-xl-bf578d5ee4485f79a40b2507fece8227c46fa730.tar.gz lite-xl-bf578d5ee4485f79a40b2507fece8227c46fa730.zip | |
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.
| -rw-r--r-- | data/core/init.lua | 12 |
1 files 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 |
