1
0
Fork 0

- [kami] increased download buffer-size;

- [kami] actually supersede a file when uploading;
- ensured the uploaded file is seleted after uploading (filesystem
  explorer window).
This commit is contained in:
cage 2022-01-14 17:37:38 +01:00
parent a44e91322f
commit 5ba28e1b4f
2 changed files with 4 additions and 3 deletions

View File

@ -418,7 +418,7 @@
(remove-all-children parent-node)
(expand-treenode window parent-path)
(win-clear window :redraw nil)
(resync-rows-db window :redraw t :selected-path parent-path)))
(resync-rows-db window :redraw t :selected-path remote-path)))
(defun recursive-delete-node (window path)
(with-accessors ((root-node filesystem-root)

View File

@ -1,6 +1,6 @@
(in-package :kami)
(a:define-constant +download-buffer+ (expt 2 10) :test #'=)
(a:define-constant +download-buffer+ (expt 2 24) :test #'=)
(a:define-constant +octect-type+ '(unsigned-byte 8) :test #'equalp)
@ -119,10 +119,11 @@
(with-open-file (input-stream source-path
:direction :input
:element-type +octect-type+)
(with-cloned-root-fid (*stream* root-fid)
(9p:remove-path *stream* root-fid destination-path))
(with-cloned-root-fid (*stream* root-fid)
(let* ((buffer (misc:make-array-frame +download-buffer+ 0 +octect-type+ t))
(fid (9p:create-path *stream* root-fid destination-path)))
(loop named write-loop
for read-so-far = (read-sequence buffer input-stream)
then (read-sequence buffer input-stream)