Fix bug related to creation of user's init file
This commit is contained in:
parent
ca9bf21819
commit
ebaa2b4f26
|
@ -137,9 +137,12 @@ end
|
||||||
|
|
||||||
local function load_user_directory()
|
local function load_user_directory()
|
||||||
local init_filename = USERDIR .. "/init.lua"
|
local init_filename = USERDIR .. "/init.lua"
|
||||||
local info = system.get_file_info(USERDIR)
|
local stat_info_dir = system.get_file_info(USERDIR)
|
||||||
if not info then
|
if not stat_info_dir then
|
||||||
create_user_directory()
|
create_user_directory()
|
||||||
|
end
|
||||||
|
local stat_info_file = system.get_file_info(init_filename)
|
||||||
|
if not stat_info_file then
|
||||||
write_user_init_file(init_filename)
|
write_user_init_file(init_filename)
|
||||||
end
|
end
|
||||||
return dofile(init_filename)
|
return dofile(init_filename)
|
||||||
|
|
Loading…
Reference in New Issue