fix: log if there is readDir() failure with ListBuckets (#15461)

This is actionable and must be logged.

Bonus: also honor umask by using 0o666 for all Open() syscalls.
This commit is contained in:
Harshavardhana
2022-08-04 07:23:05 -07:00
committed by GitHub
parent 2871cb5775
commit 3bd9615d0e
6 changed files with 40 additions and 20 deletions
+1 -1
View File
@@ -517,7 +517,7 @@ func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, upload
}
}
rc, _, err := fsOpenFile(ctx, pathJoin(uploadIDDir, fs.metaJSONFile), 0)
rc, _, err := fsOpenFile(ctx, pathJoin(uploadIDDir, fs.metaJSONFile), 0o666)
if err != nil {
if err == errFileNotFound || err == errFileAccessDenied {
return result, InvalidUploadID{Bucket: bucket, Object: object, UploadID: uploadID}