Skip to content

Commit 70563aa

Browse files
committed
Add comment
1 parent a597089 commit 70563aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/src/arrow/filesystem/s3fs.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ using internal::S3Backend;
154154
using internal::ToAwsString;
155155
using internal::ToURLEncodedAwsString;
156156

157-
static const char kSep = '/';
157+
constexpr const char kSep = '/';
158158
constexpr const char kAwsEndpointUrlEnvVar[] = "AWS_ENDPOINT_URL";
159159
constexpr const char kAwsEndpointUrlS3EnvVar[] = "AWS_ENDPOINT_URL_S3";
160160
constexpr const char kAwsDirectoryContentType[] = "application/x-directory";
@@ -1216,7 +1216,9 @@ Status SetObjectMetadata(const std::shared_ptr<const KeyValueMetadata>& metadata
12161216
}
12171217

12181218
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.
12201222
if (result.GetContentLength() > 0) {
12211223
return false;
12221224
}

0 commit comments

Comments
 (0)