From 739763675eb325732505eed9990c41a2551ca35b Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Sat, 22 May 2021 23:32:45 +0200 Subject: [PATCH] Check the real absolute path of user module Close issue #212 --- data/core/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/core/init.lua b/data/core/init.lua index e2da7806..fcadea24 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -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