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)
|
||||||
|
(let ((created-fid nil))
|
||||||
(if dirp
|
(if dirp
|
||||||
(9p:create-path *stream* cloned-root-fid (if (fs:path-referencing-dir-p path)
|
(setf created-fid
|
||||||
|
(9p:create-path *stream*
|
||||||
|
cloned-root-fid
|
||||||
|
(if (fs:path-referencing-dir-p path)
|
||||||
path
|
path
|
||||||
(text-utils:strcat path "/")))
|
(text-utils:strcat path "/"))))
|
||||||
(9p:create-path *stream* cloned-root-fid 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