Skip to content

Commit

Permalink
fix: handle symlinks for ChatDelete (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Odie authored and Robitx committed Jul 26, 2024
1 parent f0a42a2 commit db4f068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ M.cmd.ChatDelete = function()
local file_name = vim.api.nvim_buf_get_name(buf)

-- check if file is in the chat dir
if not _H.starts_with(file_name, M.config.chat_dir) then
if not _H.starts_with(file_name, vim.fn.resolve(M.config.chat_dir)) then
M.logger.warning("File " .. vim.inspect(file_name) .. " is not in chat dir")
return
end
Expand Down

0 comments on commit db4f068

Please sign in to comment.