File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ using internal::S3Backend;
154
154
using internal::ToAwsString;
155
155
using internal::ToURLEncodedAwsString;
156
156
157
- static const char kSep = ' /' ;
157
+ constexpr const char kSep = ' /' ;
158
158
constexpr const char kAwsEndpointUrlEnvVar [] = " AWS_ENDPOINT_URL" ;
159
159
constexpr const char kAwsEndpointUrlS3EnvVar [] = " AWS_ENDPOINT_URL_S3" ;
160
160
constexpr const char kAwsDirectoryContentType [] = " application/x-directory" ;
@@ -1216,7 +1216,9 @@ Status SetObjectMetadata(const std::shared_ptr<const KeyValueMetadata>& metadata
1216
1216
}
1217
1217
1218
1218
bool 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.
1220
1222
if (result.GetContentLength () > 0 ) {
1221
1223
return false ;
1222
1224
}
You can’t perform that action at this time.
0 commit comments