Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Mar 7, 2024
1 parent a597089 commit 70563aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/src/arrow/filesystem/s3fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ using internal::S3Backend;
using internal::ToAwsString;
using internal::ToURLEncodedAwsString;

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

bool IsDirectory(std::string_view key, const S3Model::HeadObjectResult& result) {
// If it has a non-zero length, it's a regular file
// If it has a non-zero length, it's a regular file. We do this even if
// the key has a trailing slash, as directory markers should never have
// any data associated to them.
if (result.GetContentLength() > 0) {
return false;
}
Expand Down

0 comments on commit 70563aa

Please sign in to comment.