jszwec / s3fs

S3 FileSystem (fs.FS) implementation
MIT License
177 stars 20 forks source link

stat fails for existing directory #3

Closed srerickson closed 2 years ago

srerickson commented 2 years ago

I believe I've identified a bug that causes Stat() to fail in certain circumstances. Given two objects, a/b.txt and a.txt, a call to fs.Stat(fsys, "a") will fail: open a: file does not exist. I believe this is because the MaxKeys budget (of 1) in the call to ListObjects is used-up by a.txt in the response Contents (link).

I'll submit a failing test in a PR

jszwec commented 2 years ago

Nice catch thanks!

Fixed by: #4

srerickson commented 2 years ago

thanks for the quick review and release!