Skip to content

Commit 8baf6cb

Browse files
committed
Fix image write to work with linux and other systems
1 parent 19b38e0 commit 8baf6cb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

eca-chat.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,9 +1722,8 @@ DATA is the binary image data as a string."
17221722
(output-path (make-temp-file "eca-screenshot-" nil (concat "." extension))))
17231723
(condition-case err
17241724
(progn
1725-
(with-temp-file output-path
1726-
(set-buffer-multibyte nil)
1727-
(insert data))
1725+
(let ((coding-system-for-write 'no-conversion))
1726+
(write-region data nil output-path nil 'silent))
17281727
(when (f-exists? output-path)
17291728
(eca-chat--with-current-buffer chat-buffer
17301729
(let ((context (list :type "file" :path output-path))

0 commit comments

Comments
 (0)