Skip to content

Commit fe44581

Browse files
authored
Merge pull request ceph#66206 from samarahu/wip-posix-s3-debugging
Reviewed-by: Daniel Gryniewicz <[email protected]>
2 parents 55dfbf1 + b46ecc1 commit fe44581

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rgw/driver/posix/rgw_sal_posix.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,11 @@ int POSIXBucket::check_empty(const DoutPrefixProvider* dpp, optional_yield y)
27552755
{
27562756
return dir->for_each(dpp, [](const char* name) {
27572757
/* for_each filters out "." and "..", so reaching here is not empty */
2758-
return -ENOTEMPTY;
2758+
std::string_view check_name = name;
2759+
if (!check_name.starts_with(".multipart")) { // incomplete uploads can be deleted
2760+
return -ENOTEMPTY;
2761+
}
2762+
return 0;
27592763
});
27602764
}
27612765

0 commit comments

Comments
 (0)