Fix apparent problem with load_session*

This commit is contained in:
Francesco Abbate 2021-06-07 09:04:17 +02:00
parent e786951e85
commit 26de50b583
1 changed files with 1 additions and 17 deletions

View File

@ -19,7 +19,7 @@ local core = {}
local function load_session() local function load_session()
local ok, t = pcall(dofile, USERDIR .. "/session.lua") local ok, t = pcall(dofile, USERDIR .. "/session.lua")
if ok then if ok then
return t.recents, t.window, t.window_mode return t.recents, t.recents_open, t.window, t.window_mode
end end
return {}, {dir={}, file={}} return {}, {dir={}, file={}}
end end
@ -64,21 +64,6 @@ function core.set_recent_open(type, filename)
end end
-- FIXME: remove or adapt
--[[ local function cleanup_recent_projects()
local recents = core.recent_projects
local i = 1
while i <= #recents do
local info = system.get_file_info(recents[i])
if not info or info.type ~= "dir" then
table.remove(recents, i)
else
i = i + 1
end
end
end ]]
function core.reschedule_project_scan() function core.reschedule_project_scan()
if core.project_scan_thread_id then if core.project_scan_thread_id then
core.threads[core.project_scan_thread_id].wake = 0 core.threads[core.project_scan_thread_id].wake = 0
@ -491,7 +476,6 @@ function core.init()
system.set_window_mode("maximized") system.set_window_mode("maximized")
end end
end end
-- cleanup_recent_projects()
core.log_items = {} core.log_items = {}
core.docs = {} core.docs = {}