From 6be8fac6805abeb7452b18f71945b586b18cf7f5 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 19 Feb 2022 14:13:03 +0100 Subject: [PATCH] - [kami] ensured 'collect-tree' returns both values: files and directories. --- src/kami/client.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kami/client.lisp b/src/kami/client.lisp index ec66f77..2c7f882 100644 --- a/src/kami/client.lisp +++ b/src/kami/client.lisp @@ -180,9 +180,15 @@ (defun collect-tree (stream root-fid) (lambda (path) (let* ((*stream* stream) - (*root-fid* root-fid)) + (*root-fid* root-fid) + (all-files nil) + (all-dirs nil)) (with-cloned-root-fid (*stream* cloned-root-fid :clunk-cloned-fid t) - (9p:collect-tree *stream* cloned-root-fid path))))) + (multiple-value-bind (files directories) + (9p:collect-tree *stream* cloned-root-fid path) + (setf all-files files) + (setf all-dirs directories))) + (values all-files all-dirs)))) (defun generate-filesystem-window-handlers (path host port query fragment