From 0e732d194b44ad97677c1e5eea7774019bfc2ee1 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 26 Jun 2025 16:18:10 +0800 Subject: [PATCH] fix: write path (#2338) --- lua/avante/llm_tools/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/avante/llm_tools/init.lua b/lua/avante/llm_tools/init.lua index 8ff6017..628697c 100644 --- a/lua/avante/llm_tools/init.lua +++ b/lua/avante/llm_tools/init.lua @@ -153,11 +153,11 @@ function M.copy_path(opts, on_log, on_complete) end end vim.fn.mkdir(new_entry_path, "p") - Path:new(new_entry_path):write(Path:new(abs_path):joinpath(entry):read()) + Path:new(new_entry_path):write(Path:new(abs_path):joinpath(entry):read(), "w") ::continue:: end else - Path:new(new_abs_path):write(Path:new(abs_path):read()) + Path:new(new_abs_path):write(Path:new(abs_path):read(), "w") end on_complete(true, nil) end