forked from Elara6331/itd
Fix crash in filesystem API (#69)
This help me fix #issues/64 Reviewed-on: Elara6331/itd#69 Reviewed-by: Elara <elara@elara.ws> Fixes #64 Co-authored-by: Vyacheslav Chigrin <vyacheslav.chigrin@izba.dev> Co-committed-by: Vyacheslav Chigrin <vyacheslav.chigrin@izba.dev>
This commit is contained in:
parent
cb5abc05e5
commit
243826bd67
@ -42,7 +42,10 @@ 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})
|
||||
return convertEntries(res.Entries), err
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return convertEntries(res.Entries), nil
|
||||
}
|
||||
|
||||
func convertEntries(e []*rpc.FileInfo) []FileInfo {
|
||||
|
Loading…
Reference in New Issue
Block a user