Skip to content

Commit bcfd0e8

Browse files
committed
🐛 Failed to purge cloud repo siyuan-note/siyuan#16262
1 parent 5d0a1cc commit bcfd0e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cloud/s3.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ func (s3 *S3) ListObjects(pathPrefix string) (ret map[string]*entity.ObjectInfo,
335335

336336
for _, entry := range output.Contents {
337337
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+
338343
ret[filePath] = &entity.ObjectInfo{
339344
Path: filePath,
340345
Size: *entry.Size,

0 commit comments

Comments
 (0)