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()) }