From 6430d61f0a1a29374289008252a43add57b1f3a5 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 26 Mar 2025 21:24:54 +0800 Subject: [PATCH] fix: parent dir not exists when write a file (#1732) --- lua/avante/llm_tools/create.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/avante/llm_tools/create.lua b/lua/avante/llm_tools/create.lua index 5e0b16b..7ad274d 100644 --- a/lua/avante/llm_tools/create.lua +++ b/lua/avante/llm_tools/create.lua @@ -66,6 +66,7 @@ function M.func(opts, on_log, on_complete) return end -- save the file + Path:new(abs_path):parent():mkdir({ parents = true, exists_ok = true }) local current_winid = vim.api.nvim_get_current_win() local winid = Utils.get_winid(bufnr) vim.api.nvim_set_current_win(winid)