Check if session file returned anything
This commit is contained in:
parent
a134c8ea99
commit
371914af67
|
@ -17,7 +17,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 and t then
|
||||||
return t.recents, t.window, t.window_mode
|
return t.recents, t.window, t.window_mode
|
||||||
end
|
end
|
||||||
return {}
|
return {}
|
||||||
|
@ -441,7 +441,7 @@ function core.init()
|
||||||
elseif window_mode == "maximized" then
|
elseif window_mode == "maximized" then
|
||||||
system.set_window_mode("maximized")
|
system.set_window_mode("maximized")
|
||||||
end
|
end
|
||||||
core.recent_projects = recent_projects
|
core.recent_projects = recent_projects or {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local project_dir = core.recent_projects[1] or "."
|
local project_dir = core.recent_projects[1] or "."
|
||||||
|
|
Loading…
Reference in New Issue