Create subdirs when creating new note

previously it failed with error message
This commit is contained in:
Sleepful
2023-07-05 22:34:48 -06:00
parent eb1d228e8d
commit f2f517d0c8

View File

@@ -448,7 +448,13 @@ local function create_note_from_template(
end
-- now write the output file, substituting vars line by line
local filedir = title:match("(.*/)") or ""
local dir_succeed = check_dir_and_ask(filedir, filedir)
if dir_succeed == false then
return
end
local ofile = io.open(filepath, "a")
for _, line in pairs(lines) do
ofile:write(
templates.subst_templated_values(