Minor cleanup to project directory stuff

This commit is contained in:
Francesco Abbate 2020-12-26 23:39:27 +01:00
parent 54518c438d
commit 5449781353
2 changed files with 2 additions and 6 deletions

View File

@ -81,10 +81,10 @@ local function project_scan_thread()
local max_entries = config.max_project_files
for _, file in ipairs(all) do
if not common.match_pattern(file, config.ignore_files) then
local file = (path ~= "." and path .. PATHSEP or "") .. file
local file = path .. PATHSEP .. file
local info = system.get_file_info(file)
if info and info.size < size_limit then
info.filename = system.absolute_path(file)
info.filename = file
table.insert(info.type == "dir" and dirs or files, info)
entries_count = entries_count + 1
if entries_count > max_entries then break end

View File

@ -37,10 +37,6 @@ local function relative_filename(filename, dirname)
end
local function belongs_to_directory(item, dirname)
return relative_filename(item.filename, dirname)
end
function TreeView:get_cached(item, dirname)
local dir_cache = self.cache[dirname]