emkornfield commented on code in PR #12763: URL: https://github.com/apache/arrow/pull/12763#discussion_r852615982
########## cpp/src/arrow/filesystem/gcsfs.cc: ########## @@ -340,11 +372,13 @@ class GcsFileSystem::Impl { } // Skip the directory itself from the results, and any result that is "too deep" // into the recursion. - if (o->name() == p.object || internal::Depth(o->name()) > max_depth) { + bool has_trailing_slash = !o->name().empty() && o->name().back() == '/'; + if (o->name() == canonical || o->name() == p.object || + internal::Depth(o->name()) > (max_depth + has_trailing_slash)) { Review Comment: yes, going to look at this further. ########## cpp/src/arrow/filesystem/gcsfs.cc: ########## @@ -417,7 +458,7 @@ class GcsFileSystem::Impl { // Note that the list of parents are sorted from deepest to most shallow, this is // convenient because as soon as we find a directory we can stop the iteration. for (auto const& d : missing_parents) { - auto o = CreateDirMarker(bucket, d); + auto o = CreateDirMarker(bucket, internal::EnsureTrailingSlash(d)); Review Comment: removed. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org