branch: externals/ellama
commit 7c8e6ae061c9ef306d31d802dd45c390b8a1293f
Author: Sergey Kostyaev <[email protected]>
Commit: Sergey Kostyaev <[email protected]>

    Normalize file path in write-file function
    
    Added expand-file-name to properly handle both absolute and relative paths 
when
    writing files, preventing potential issues with file path resolution.
---
 ellama-tools.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ellama-tools.el b/ellama-tools.el
index ad78c26e09..923dc5b192 100644
--- a/ellama-tools.el
+++ b/ellama-tools.el
@@ -314,7 +314,7 @@ TOOL-PLIST is a property list in the format expected by 
`llm-make-tool'."
   "Write CONTENT to the file located at the specified PATH."
   (with-temp-buffer
     (insert content)
-    (setq buffer-file-name path)
+    (setq buffer-file-name (expand-file-name path))
     (save-buffer)))
 
 (ellama-tools-define-tool

Reply via email to