mirror of https://codeberg.org/cage/tinmop/
- [kami] when downloading file, strips directories from remote paths.
This commit is contained in:
parent
9752f1e7bc
commit
16a7d760e9
|
@ -416,6 +416,7 @@
|
||||||
(destination-file (make-temporary-file-from-path remote-path)))
|
(destination-file (make-temporary-file-from-path remote-path)))
|
||||||
(when-let* ((root-node (filesystem-root window))
|
(when-let* ((root-node (filesystem-root window))
|
||||||
(matching-node (find-node root-node remote-path)))
|
(matching-node (find-node root-node remote-path)))
|
||||||
|
(fs:create-file destination-file)
|
||||||
(funcall (filesystem-download-function window) matching-node destination-file)))
|
(funcall (filesystem-download-function window) matching-node destination-file)))
|
||||||
|
|
||||||
(defun upload-treenode (window source-file remote-path)
|
(defun upload-treenode (window source-file remote-path)
|
||||||
|
@ -551,7 +552,8 @@
|
||||||
(let* ((type (filesystem-query-treenode window
|
(let* ((type (filesystem-query-treenode window
|
||||||
a
|
a
|
||||||
:type)))
|
:type)))
|
||||||
(eq type :directory)))
|
(or (null type)
|
||||||
|
(eq type :directory))))
|
||||||
all-children)))
|
all-children)))
|
||||||
(remove-if-not (lambda (a) (fs:filename-pattern-match path-pattern a))
|
(remove-if-not (lambda (a) (fs:filename-pattern-match path-pattern a))
|
||||||
all-files))))
|
all-files))))
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
(let* ((*stream* stream)
|
(let* ((*stream* stream)
|
||||||
(*root-fid* root-fid))
|
(*root-fid* root-fid))
|
||||||
(with-cloned-root-fid (*stream* 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
|
(ecase what
|
||||||
(:type
|
(:type
|
||||||
(9p:stat-entry-type stat-entry))
|
(9p:stat-entry-type stat-entry))
|
||||||
|
|
|
@ -2524,11 +2524,11 @@ printed, on the main window."
|
||||||
(if (fs:extension-dir-p source-pattern)
|
(if (fs:extension-dir-p source-pattern)
|
||||||
(error-message (format nil "~a is a directory" source-pattern))
|
(error-message (format nil "~a is a directory" source-pattern))
|
||||||
(with-enqueued-process ()
|
(with-enqueued-process ()
|
||||||
(let* ((remote-files (filesystem-tree-window:filter-node-children win
|
(let* ((remote-files (fstree:filter-node-children win
|
||||||
source-pattern))
|
source-pattern))
|
||||||
(local-files (mapcar (lambda (a)
|
(local-files (mapcar (lambda (a)
|
||||||
(fs:append-file-to-path local-dir
|
(fs:append-file-to-path local-dir
|
||||||
a))
|
(fs:path-last-element a)))
|
||||||
remote-files)))
|
remote-files)))
|
||||||
(if (null remote-files)
|
(if (null remote-files)
|
||||||
(error-message (format nil
|
(error-message (format nil
|
||||||
|
@ -2712,18 +2712,18 @@ if the selected item represents a directory."
|
||||||
(path (fstree:tree-path fields))
|
(path (fstree:tree-path fields))
|
||||||
(size (fstree:filesystem-query-treenode win path :size-string))
|
(size (fstree:filesystem-query-treenode win path :size-string))
|
||||||
(permissions (fstree:filesystem-query-treenode win path :permissions-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+))
|
(bg (swconf:win-bg swconf:+key-help-dialog+))
|
||||||
(fg (swconf:win-fg swconf:+key-help-dialog+)))
|
(fg (swconf:win-fg swconf:+key-help-dialog+)))
|
||||||
(windows:make-blocking-message-dialog *main-window*
|
(windows:make-blocking-message-dialog *main-window*
|
||||||
nil
|
nil
|
||||||
(format nil (_ "Details of: ~a") path)
|
(format nil (_ "Details of: ~a") path)
|
||||||
(list (_ "Type")
|
(list (_ "Type")
|
||||||
entry-type
|
(to-s entry-type)
|
||||||
(_ "Size")
|
(_ "Size")
|
||||||
size
|
(to-s size)
|
||||||
(_ "Permissions")
|
(_ "Permissions")
|
||||||
permissions)
|
(to-s permissions))
|
||||||
bg
|
bg
|
||||||
fg)))
|
fg)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue