From 95016d54c1d2cd13faf34425fca0abb7dadc0d6e Mon Sep 17 00:00:00 2001 From: royalcat Date: Thu, 5 Dec 2024 13:58:07 +0300 Subject: [PATCH] fix walk --- src/vfs/utils.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vfs/utils.go b/src/vfs/utils.go index 10c16f4..1b592c6 100644 --- a/src/vfs/utils.go +++ b/src/vfs/utils.go @@ -143,8 +143,12 @@ func readdirnames(ctx context.Context, vfs Filesystem, dir string) ([]string, er return nil, err } - var names []string + names := make([]string, 0, len(files)) for _, file := range files { + if file == nil { + continue + } + names = append(names, file.Name()) }