fix: properly treat files in ZK home

This commit is contained in:
lambtho12
2022-01-18 11:52:35 +01:00
parent 5f19d27a9a
commit 15d4355ac1

View File

@@ -202,6 +202,7 @@ local function escape(s)
end end
local function recursive_substitution(dir, old, new) local function recursive_substitution(dir, old, new)
if vim.fn.has("mac") == 1 or vim.fn.has("unix") == 1 then
os.execute( os.execute(
"find " "find "
.. dir .. dir
@@ -213,6 +214,9 @@ local function recursive_substitution(dir, old, new)
.. new .. new
.. "|g' {} +" .. "|g' {} +"
) )
else
print("Cannot open update links on your operating system")
end
end end
-- ---------------------------------------------------------------------------- -- ----------------------------------------------------------------------------
@@ -1427,7 +1431,7 @@ local function RenameNote()
newname = newname:gsub("[" .. M.Cfg.extension .. "]+$", "") newname = newname:gsub("[" .. M.Cfg.extension .. "]+$", "")
local newpath = newname:match("(.*/)") local newpath = newname:match("(.*/)")
if M.Cfg.subdirs_in_links == true and newpath == nil then if M.Cfg.subdirs_in_links == true and newpath == nil and subdir ~= "" then
newname = subdir .. "/" .. newname newname = subdir .. "/" .. newname
end end