1
0
Fork 0

- prevented reusing an already clunked fid when uploading a file.

This commit is contained in:
cage 2022-02-19 13:21:06 +01:00
parent 6db658862f
commit 39ffbee1a6
2 changed files with 7 additions and 14 deletions

View File

@ -195,16 +195,6 @@
(define-key "M-l" #'load-script-file)
;; focus
(define-key "f1" #'focus-to-tags-window)
(define-key "f2" #'focus-to-thread-window)
(define-key "f3" #'focus-to-message-window)
(define-key "f4" #'focus-to-conversations-window)
;; follow requests keymap
(define-key "up" #'follow-request-go-up *follow-requests-keymap*)

View File

@ -138,7 +138,7 @@
:element-type +octect-type+)
(with-cloned-root-fid (*stream* cloned-root-fid)
(9p:remove-path *stream* cloned-root-fid destination-path))
(with-cloned-root-fid (*stream* cloned-root-fid)
(with-cloned-root-fid (*stream* cloned-root-fid :clunk-cloned-fid nil)
(let* ((buffer (misc:make-array-frame +download-buffer+ 0 +octect-type+ t))
(fid (9p:create-path *stream* cloned-root-fid destination-path)))
(loop named write-loop
@ -149,9 +149,12 @@
(9p:9p-write *stream* fid offset (subseq buffer 0 read-so-far))
(when (< read-so-far +download-buffer+)
(return-from write-loop t)))
(9p:9p-clunk *stream* fid)
(9p:change-mode *stream* *root-fid* destination-path source-permissions)
(9p:read-all-pending-messages stream))))))))
(9p:9p-clunk *stream* fid)))
(with-cloned-root-fid (*stream* cloned-root-fid)
(9p:change-mode *stream*
cloned-root-fid
destination-path source-permissions)
(9p:read-all-pending-messages stream)))))))
(defun query-path (stream root-fid)
(lambda (path what)