fix: create parent dir (#2296)
This commit is contained in:
@@ -737,7 +737,7 @@ function M.func(opts, on_log, on_complete, session_ctx)
|
||||
end
|
||||
local parent_dir = vim.fn.fnamemodify(abs_path, ":h")
|
||||
--- check if the parent dir is exists, if not, create it
|
||||
if not vim.fn.isdirectory(parent_dir) then vim.fn.mkdir(parent_dir, "p") end
|
||||
if vim.fn.isdirectory(parent_dir) == 0 then vim.fn.mkdir(parent_dir, "p") end
|
||||
vim.api.nvim_buf_call(bufnr, function() vim.cmd("noautocmd write") end)
|
||||
if session_ctx then Helpers.mark_as_not_viewed(opts.path, session_ctx) end
|
||||
on_complete(true, nil)
|
||||
|
||||
Reference in New Issue
Block a user