diff --git a/system/fs.go b/system/fs.go index 5f87df6..030532e 100644 --- a/system/fs.go +++ b/system/fs.go @@ -213,7 +213,9 @@ func (n ipfsNode) ReadDir(max int) (entries []fs.DirEntry, err error) { // If we get here, it's because the iterator stopped. It either // failed or is exhausted. Any other error has already caused us // to return. - if err = iter.Err(); err == nil { + if iter.Err() != nil { + err = iter.Err() // failed + } else if max >= 0 { err = io.EOF // exhausted } diff --git a/system/fs_test.go b/system/fs_test.go index 01fc283..5e99591 100644 --- a/system/fs_test.go +++ b/system/fs_test.go @@ -14,8 +14,6 @@ import ( func TestFS(t *testing.T) { t.Parallel() - t.Skip("TODO: re-enable and make sure these pass") - root, err := path.NewPath("/ipfs/QmQuTsZYyFSVXD8r6yfWyJyJ5xhzV8wkqy9wWuTeoccDtW") require.NoError(t, err)