emkornfield commented on code in PR #12763:
URL: https://github.com/apache/arrow/pull/12763#discussion_r852615374
##########
cpp/src/arrow/filesystem/gcsfs.cc:
##########
@@ -318,19 +326,43 @@ class GcsFileSystem::Impl {
return GetFileInfoBucket(path, std::move(meta).status());
}
auto meta = client_.GetObjectMetadata(path.bucket, path.object);
- return GetFileInfoObject(path, meta);
+ Result<FileInfo> info = GetFileInfoObject(path, meta);
+ if (!info.ok() || info->type() != FileType::NotFound) {
+ return info;
+ }
+ // Not found case. It could be this was written to GCS with a different
+ // "Directory" convention. So it if there are is at least one objec that
+ // matches the prefix we assume it is a directory.
Review Comment:
tried to rephrase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]