1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-25 00:00:54 +01:00

- [gemini] prevented signalling a condition when quitting the program

and a gemini text is streaming;

  if   there   is   some    gemini   text   streaming   the   function
  'ui:clean-temporary-file' will  remove the  file that  the streaming
  thread is  using for  caching. So when  the gemini  rendering thread
  returns will  try to remove the  already deleted file, leading  to a
  crash.
This commit is contained in:
cage 2021-10-04 20:42:39 +02:00
parent fd39d15050
commit d622a02098

View File

@ -281,13 +281,17 @@
(defmacro with-open-support-file ((stream file &optional (element-type '(unsigned-byte 8))) (defmacro with-open-support-file ((stream file &optional (element-type '(unsigned-byte 8)))
&body body) &body body)
`(with-open-file (,stream ,file `(handler-case
(with-open-file (,stream ,file
:element-type ',element-type :element-type ',element-type
:direction :output :direction :output
:element-type 'character :element-type 'character
:if-exists :supersede :if-exists :supersede
:if-does-not-exist :create) :if-does-not-exist :create)
,@body)) ,@body)
(file-error (condition)
(declare (ignore condition))
nil)))
(defgeneric increment-bytes-count (object data &key &allow-other-keys)) (defgeneric increment-bytes-count (object data &key &allow-other-keys))