mirror of https://codeberg.org/cage/tinmop/
- [kami] prevented a crash (and a fid leak) when creating new files or directories.
This commit is contained in:
parent
7f6c6feace
commit
dce7598989
|
@ -88,12 +88,18 @@
|
||||||
(let* ((*stream* stream)
|
(let* ((*stream* stream)
|
||||||
(*root-fid* root-fid))
|
(*root-fid* root-fid))
|
||||||
(assert path)
|
(assert path)
|
||||||
(with-cloned-root-fid (*stream* cloned-root-fid)
|
(with-cloned-root-fid (*stream* cloned-root-fid :clunk-cloned-fid nil)
|
||||||
(if dirp
|
(let ((created-fid nil))
|
||||||
(9p:create-path *stream* cloned-root-fid (if (fs:path-referencing-dir-p path)
|
(if dirp
|
||||||
path
|
(setf created-fid
|
||||||
(text-utils:strcat path "/")))
|
(9p:create-path *stream*
|
||||||
(9p:create-path *stream* cloned-root-fid path))))))
|
cloned-root-fid
|
||||||
|
(if (fs:path-referencing-dir-p path)
|
||||||
|
path
|
||||||
|
(text-utils:strcat path "/"))))
|
||||||
|
(setf created-fid
|
||||||
|
(9p:create-path *stream* cloned-root-fid path)))
|
||||||
|
(9p:9p-clunk *stream* created-fid))))))
|
||||||
|
|
||||||
(defun download-node (stream root-fid)
|
(defun download-node (stream root-fid)
|
||||||
(lambda (node
|
(lambda (node
|
||||||
|
|
Loading…
Reference in New Issue