mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-03 04:37:29 +01:00
- 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."
|
||||
(let ((absolute-path (let ((resolved ""))
|
||||
(cffi:with-foreign-string (ptr-path path)
|
||||
(cffi:with-foreign-string (ptr-resolved resolved)
|
||||
(ffi-realpath ptr-path ptr-resolved))))))
|
||||
(setf resolved
|
||||
(cffi:with-foreign-pointer-as-string (ptr-resolved 4096)
|
||||
(ffi-realpath ptr-path ptr-resolved))))
|
||||
resolved)))
|
||||
(cond
|
||||
((null absolute-path)
|
||||
path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user