fix: changes for file paths

This commit is contained in:
2024-12-12 20:25:26 +01:00
parent 78b0172772
commit 30b119e5f9
5 changed files with 24 additions and 63 deletions

View File

@@ -1,7 +1,3 @@
-- lua/chatgpt_nvim/handler.lua
-- No major changes needed, just ensure it can be reused for the new command.
-- Ensuring we have get_clipboard_content and write_file as is.
local M = {}
function M.get_clipboard_content()
@@ -11,7 +7,7 @@ end
function M.write_file(filepath, content)
local fd = vim.loop.fs_open(filepath, "w", 438)
if not fd then
vim.api.nvim_err_writeln("Could not open file: " .. filepath)
vim.api.nvim_err_writeln("Could not open file for writing: " .. filepath)
return
end
vim.loop.fs_write(fd, content, -1)