Refact: better name for make_absolute_path()

This commit is contained in:
lambtho12
2022-01-21 14:58:38 +01:00
parent 5e31b13cfb
commit c2084a30c7

View File

@@ -199,7 +199,7 @@ local function escape(s)
return string.gsub(s, "[%%%]%^%-$().[*+?]", "%%%1") return string.gsub(s, "[%%%]%^%-$().[*+?]", "%%%1")
end end
local function make_absolute_path(path) local function make_config_path_absolute(path)
local ret = path local ret = path
if not (Path:new(path):is_absolute()) and path ~= nil then if not (Path:new(path):is_absolute()) and path ~= nil then
ret = M.Cfg.home .. "/" .. path ret = M.Cfg.home .. "/" .. path
@@ -2569,10 +2569,10 @@ local function Setup(cfg)
end end
-- Convert all directories in full path -- Convert all directories in full path
M.Cfg.image_subdir = make_absolute_path(M.Cfg.image_subdir) M.Cfg.image_subdir = make_config_path_absolute(M.Cfg.image_subdir)
M.Cfg.dailies = make_absolute_path(M.Cfg.dailies) M.Cfg.dailies = make_config_path_absolute(M.Cfg.dailies)
M.Cfg.weeklies = make_absolute_path(M.Cfg.weeklies) M.Cfg.weeklies = make_config_path_absolute(M.Cfg.weeklies)
M.Cfg.templates = make_absolute_path(M.Cfg.templates) M.Cfg.templates = make_config_path_absolute(M.Cfg.templates)
end end
M.find_notes = FindNotes M.find_notes = FindNotes