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.
This commit is contained in:
parent
445c79bb52
commit
bf578d5ee4
|
@ -582,9 +582,17 @@ end
|
||||||
|
|
||||||
local function project_scan_add_file(dir, filepath)
|
local function project_scan_add_file(dir, filepath)
|
||||||
local fileinfo = get_project_file_info(dir.name, PATHSEP .. filepath)
|
local fileinfo = get_project_file_info(dir.name, PATHSEP .. filepath)
|
||||||
if not fileinfo or not fileinfo_pass_filter(fileinfo) then return end
|
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)
|
project_scan_add_entry(dir, fileinfo)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- create a directory using mkdir but may need to create the parent
|
-- create a directory using mkdir but may need to create the parent
|
||||||
|
|
Loading…
Reference in New Issue