File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ using internal::S3Backend;
154154using internal::ToAwsString;
155155using internal::ToURLEncodedAwsString;
156156
157- static const char kSep = ' /' ;
157+ constexpr const char kSep = ' /' ;
158158constexpr const char kAwsEndpointUrlEnvVar [] = " AWS_ENDPOINT_URL" ;
159159constexpr const char kAwsEndpointUrlS3EnvVar [] = " AWS_ENDPOINT_URL_S3" ;
160160constexpr const char kAwsDirectoryContentType [] = " application/x-directory" ;
@@ -1216,7 +1216,9 @@ Status SetObjectMetadata(const std::shared_ptr<const KeyValueMetadata>& metadata
12161216}
12171217
12181218bool IsDirectory (std::string_view key, const S3Model::HeadObjectResult& result) {
1219- // If it has a non-zero length, it's a regular file
1219+ // If it has a non-zero length, it's a regular file. We do this even if
1220+ // the key has a trailing slash, as directory markers should never have
1221+ // any data associated to them.
12201222 if (result.GetContentLength () > 0 ) {
12211223 return false ;
12221224 }
You can’t perform that action at this time.
0 commit comments