diff --git a/be/src/io/fs/s3_file_system.cpp b/be/src/io/fs/s3_file_system.cpp index b3b7c74a02..00a4eed292 100644 --- a/be/src/io/fs/s3_file_system.cpp +++ b/be/src/io/fs/s3_file_system.cpp @@ -51,6 +51,9 @@ S3FileSystem::S3FileSystem(S3Conf s3_conf, ResourceId resource_id) fmt::format("{}/{}/{}", s3_conf.endpoint, s3_conf.bucket, s3_conf.prefix), std::move(resource_id), FileSystemType::S3), _s3_conf(std::move(s3_conf)) { + if (_s3_conf.prefix.size() > 0 && _s3_conf.prefix[0] == '/') { + _s3_conf.prefix = _s3_conf.prefix.substr(1); + } _executor = Aws::MakeShared( resource_id.c_str(), config::s3_transfer_executor_pool_size); }