Update s3_file_system.cc

This commit is contained in:
Meng Zhang 2020-02-04 20:37:26 -08:00 committed by GitHub
parent f8e0deac4d
commit ec25c31a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,7 +400,7 @@ Status S3FileSystem::GetChildren(const string& dir,
string bucket, prefix;
TF_RETURN_IF_ERROR(ParseS3Path(dir, true, &bucket, &prefix));
if (prefix.empty() || prefix.back() != '/') {
if (!prefix.empty() && prefix.back() != '/') {
prefix.push_back('/');
}