mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix: properly treat files in ZK home
This commit is contained in:
@@ -202,6 +202,7 @@ local function escape(s)
|
||||
end
|
||||
|
||||
local function recursive_substitution(dir, old, new)
|
||||
if vim.fn.has("mac") == 1 or vim.fn.has("unix") == 1 then
|
||||
os.execute(
|
||||
"find "
|
||||
.. dir
|
||||
@@ -213,6 +214,9 @@ local function recursive_substitution(dir, old, new)
|
||||
.. new
|
||||
.. "|g' {} +"
|
||||
)
|
||||
else
|
||||
print("Cannot open update links on your operating system")
|
||||
end
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
@@ -1427,7 +1431,7 @@ local function RenameNote()
|
||||
newname = newname:gsub("[" .. M.Cfg.extension .. "]+$", "")
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user