We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d0a1cc commit bcfd0e8Copy full SHA for bcfd0e8
cloud/s3.go
@@ -335,6 +335,11 @@ func (s3 *S3) ListObjects(pathPrefix string) (ret map[string]*entity.ObjectInfo,
335
336
for _, entry := range output.Contents {
337
filePath := strings.TrimPrefix(*entry.Key, pathPrefix)
338
+ if "" == filePath {
339
+ logging.LogWarnf("skip empty file path for key [%s]", *entry.Key)
340
+ continue
341
+ }
342
+
343
ret[filePath] = &entity.ObjectInfo{
344
Path: filePath,
345
Size: *entry.Size,
0 commit comments