From 617469cd0690c84264f7d472cf1fe860ccfc0832 Mon Sep 17 00:00:00 2001 From: Thomas Lambert Date: Tue, 9 May 2023 21:02:50 +0200 Subject: [PATCH] fix: trailing / issue in image_subdir (closes:#244) --- lua/telekasten.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index 45c124f..cc8676d 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -236,7 +236,12 @@ local function make_config_path_absolute(path) if not (Path:new(path):is_absolute()) and path ~= nil then ret = M.Cfg.home .. "/" .. path end - return ret:gsub("/$", "") + + if ret ~= nil then + ret = ret:gsub("/$", "") + end + + return ret end local function recursive_substitution(dir, old, new)