mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
gateway/hdfs: Fix isObjectDir to behave correctly (#8368)
This commit is contained in:
parent
290ad0996f
commit
d2a8be6fc2
@ -509,10 +509,11 @@ func (n *hdfsObjects) isObjectDir(ctx context.Context, bucket, object string) bo
|
||||
}
|
||||
defer f.Close()
|
||||
fis, err := f.Readdir(1)
|
||||
if err != nil {
|
||||
if err != nil && err != io.EOF {
|
||||
logger.LogIf(ctx, err)
|
||||
return false
|
||||
}
|
||||
// Readdir returns an io.EOF when len(fis) == 0.
|
||||
return len(fis) == 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user