From d1e515700832020e896ea8ecc93789692e661df1 Mon Sep 17 00:00:00 2001 From: Vyacheslav Chigrin Date: Tue, 2 Jul 2024 23:32:13 +0300 Subject: [PATCH] Fix crash in filesystem API. --- api/fs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/fs.go b/api/fs.go index 6d5d178..b0f400c 100644 --- a/api/fs.go +++ b/api/fs.go @@ -42,6 +42,9 @@ func (c *FSClient) Mkdir(ctx context.Context, paths ...string) error { func (c *FSClient) ReadDir(ctx context.Context, dir string) ([]FileInfo, error) { res, err := c.client.ReadDir(ctx, &rpc.PathRequest{Path: dir}) + if err != nil { + return nil, err + } return convertEntries(res.Entries), err }