mirror of https://codeberg.org/cage/tinmop/
- fixed error with foreign memory when calling FFI 'realpath'.
This commit is contained in:
parent
e5c7929166
commit
6e1274faf2
|
@ -311,8 +311,10 @@ symbolic link."
|
||||||
"NB: returns `PATH` if the FFI call to `realpath` returns NULL."
|
"NB: returns `PATH` if the FFI call to `realpath` returns NULL."
|
||||||
(let ((absolute-path (let ((resolved ""))
|
(let ((absolute-path (let ((resolved ""))
|
||||||
(cffi:with-foreign-string (ptr-path path)
|
(cffi:with-foreign-string (ptr-path path)
|
||||||
(cffi:with-foreign-string (ptr-resolved resolved)
|
(setf resolved
|
||||||
(ffi-realpath ptr-path ptr-resolved))))))
|
(cffi:with-foreign-pointer-as-string (ptr-resolved 4096)
|
||||||
|
(ffi-realpath ptr-path ptr-resolved))))
|
||||||
|
resolved)))
|
||||||
(cond
|
(cond
|
||||||
((null absolute-path)
|
((null absolute-path)
|
||||||
path)
|
path)
|
||||||
|
|
Loading…
Reference in New Issue