Check the real absolute path of user module

Close issue #212
This commit is contained in:
Francesco Abbate 2021-05-22 23:32:45 +02:00
parent 81e8c8a223
commit 739763675e
1 changed files with 2 additions and 1 deletions

View File

@ -1011,7 +1011,8 @@ end
core.add_save_hook(function(filename)
local doc = core.active_view.doc
if doc and doc:is(Doc) and doc.abs_filename == USERDIR .. PATHSEP .. "init.lua" then
local user_filename = system.absolute_path(USERDIR .. PATHSEP .. "init.lua")
if doc and doc:is(Doc) and doc.abs_filename == user_filename then
core.reload_module("core.style")
core.load_user_directory()
end