You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/30 10:31:37 UTC
[doris] branch master updated: Fix bug in s3 delete directory (#11344)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new fb90586122 Fix bug in s3 delete directory (#11344)
fb90586122 is described below
commit fb9058612221f5ba72878755876bb067baba8a94
Author: plat1ko <pl...@gmail.com>
AuthorDate: Sat Jul 30 18:31:32 2022 +0800
Fix bug in s3 delete directory (#11344)
---
be/src/io/fs/s3_file_system.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/be/src/io/fs/s3_file_system.cpp b/be/src/io/fs/s3_file_system.cpp
index 65d6a27de7..575a51302b 100644
--- a/be/src/io/fs/s3_file_system.cpp
+++ b/be/src/io/fs/s3_file_system.cpp
@@ -174,6 +174,9 @@ Status S3FileSystem::delete_directory(const Path& path) {
Aws::S3::Model::ListObjectsV2Request request;
auto prefix = get_key(path);
+ if (!prefix.empty() && prefix.back() != '/') {
+ prefix.push_back('/');
+ }
request.WithBucket(_s3_conf.bucket).WithPrefix(prefix);
Aws::S3::Model::DeleteObjectsRequest delete_request;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org