1
0
Fork 0

- [kami] when downloading file, strips directories from remote paths.

This commit is contained in:
cage 2022-01-28 15:56:12 +01:00
parent 9752f1e7bc
commit 16a7d760e9
3 changed files with 11 additions and 9 deletions

View File

@ -416,6 +416,7 @@
(destination-file (make-temporary-file-from-path remote-path)))
(when-let* ((root-node (filesystem-root window))
(matching-node (find-node root-node remote-path)))
(fs:create-file destination-file)
(funcall (filesystem-download-function window) matching-node destination-file)))
(defun upload-treenode (window source-file remote-path)
@ -551,7 +552,8 @@
(let* ((type (filesystem-query-treenode window
a
:type)))
(eq type :directory)))
(or (null type)
(eq type :directory))))
all-children)))
(remove-if-not (lambda (a) (fs:filename-pattern-match path-pattern a))
all-files))))

View File

@ -142,7 +142,7 @@
(let* ((*stream* stream)
(*root-fid* root-fid))
(with-cloned-root-fid (*stream* root-fid)
(a:when-let ((stat-entry (9p:path-exists-p *stream* root-fid path)))
(a:when-let ((stat-entry (9p:path-info *stream* root-fid path)))
(ecase what
(:type
(9p:stat-entry-type stat-entry))

View File

@ -2524,11 +2524,11 @@ printed, on the main window."
(if (fs:extension-dir-p source-pattern)
(error-message (format nil "~a is a directory" source-pattern))
(with-enqueued-process ()
(let* ((remote-files (filesystem-tree-window:filter-node-children win
source-pattern))
(let* ((remote-files (fstree:filter-node-children win
source-pattern))
(local-files (mapcar (lambda (a)
(fs:append-file-to-path local-dir
a))
(fs:path-last-element a)))
remote-files)))
(if (null remote-files)
(error-message (format nil
@ -2712,18 +2712,18 @@ if the selected item represents a directory."
(path (fstree:tree-path fields))
(size (fstree:filesystem-query-treenode win path :size-string))
(permissions (fstree:filesystem-query-treenode win path :permissions-string))
(entry-type (symbol-name (fstree:filesystem-query-treenode win path :type)))
(entry-type (fstree:filesystem-query-treenode win path :type))
(bg (swconf:win-bg swconf:+key-help-dialog+))
(fg (swconf:win-fg swconf:+key-help-dialog+)))
(windows:make-blocking-message-dialog *main-window*
nil
(format nil (_ "Details of: ~a") path)
(list (_ "Type")
entry-type
(to-s entry-type)
(_ "Size")
size
(to-s size)
(_ "Permissions")
permissions)
(to-s permissions))
bg
fg)))