mirror of https://codeberg.org/cage/tinmop/
- used osicat as provider for 'mkstemps'.
This commit is contained in:
parent
9fab9d8771
commit
808dad006e
|
@ -358,13 +358,11 @@
|
|||
(text-utils:strcat home *directory-sep*)
|
||||
home)))
|
||||
|
||||
(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 (length suffix))
|
||||
(cffi:foreign-string-to-lisp ptr-template))))
|
||||
(multiple-value-bind (x path)
|
||||
(nix:mkstemps prefix suffix)
|
||||
(declare (ignore x))
|
||||
path))
|
||||
|
||||
(defparameter *temporary-files-created* ())
|
||||
|
||||
|
|
Loading…
Reference in New Issue