mirror of
https://codeberg.org/cage/tinmop/
synced 2025-03-01 09:47:46 +01:00
- used 'mkstemps' intead of 'mkstemp' as the latter does not supports
suffix and the temporary keeps the same names.
This commit is contained in:
parent
df74b5b3a3
commit
a2e9016bf7
@ -267,12 +267,12 @@
|
||||
(text-utils:strcat home *directory-sep*)
|
||||
home)))
|
||||
|
||||
(cffi:defcfun (ffi-mkstemp "mkstemp") :int (template :pointer))
|
||||
(cffi:defcfun (ffi-mkstemp "mkstemps") :int (template :pointer) (suffix-length :int))
|
||||
|
||||
(defun %mkstemp (prefix suffix)
|
||||
(let ((template (text-utils:strcat prefix "XXXXXX" suffix)))
|
||||
(cffi:with-foreign-string (ptr-template template)
|
||||
(ffi-mkstemp ptr-template)
|
||||
(ffi-mkstemp ptr-template (length suffix))
|
||||
(cffi:foreign-string-to-lisp ptr-template))))
|
||||
|
||||
(defparameter *temporary-files-created* ())
|
||||
|
Loading…
x
Reference in New Issue
Block a user