Fix problems with project files and project directories
Now treat coherently the case when the project directory is removed from the project directories.
This commit is contained in:
parent
7280ae47ab
commit
c3f5d2c144
|
@ -154,11 +154,11 @@ local function project_scan_thread()
|
||||||
config.max_project_files.." files according to config.max_project_files.")
|
config.max_project_files.." files according to config.max_project_files.")
|
||||||
end
|
end
|
||||||
dir.files = t
|
dir.files = t
|
||||||
|
core.redraw = true
|
||||||
|
end
|
||||||
if dir.name == core.project_dir then
|
if dir.name == core.project_dir then
|
||||||
include_project_dir = true
|
include_project_dir = true
|
||||||
core.project_files = t
|
core.project_files = dir.files
|
||||||
end
|
|
||||||
core.redraw = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not include_project_dir then
|
if not include_project_dir then
|
||||||
|
|
|
@ -168,13 +168,12 @@ local function load_workspace()
|
||||||
if active_view then
|
if active_view then
|
||||||
core.set_active_view(active_view)
|
core.set_active_view(active_view)
|
||||||
end
|
end
|
||||||
|
core.project_directories = {}
|
||||||
for i, dir_name in ipairs(t.directories) do
|
for i, dir_name in ipairs(t.directories) do
|
||||||
if dir_name ~= "" then
|
|
||||||
core.add_project_directory(system.absolute_path(dir_name))
|
core.add_project_directory(system.absolute_path(dir_name))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
local run = core.run
|
local run = core.run
|
||||||
|
|
Loading…
Reference in New Issue