Skip to content

Commit

Permalink
Fix GetFileInfoWithSelectorFromFileSystem on root of container
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Oct 4, 2024
1 parent 0afc3a9 commit 0e7e966
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1929,15 +1929,18 @@ class AzureFileSystem::Impl {
/// \brief List the paths at the root of a filesystem or some dir in a filesystem.
///
/// \pre adlfs_client is the client for the filesystem named like the first
/// segment of select.base_dir.
/// segment of select.base_dir. The filesystem is know to exist.
Status GetFileInfoWithSelectorFromFileSystem(
const DataLake::DataLakeFileSystemClient& adlfs_client,
const Core::Context& context, Azure::Nullable<int32_t> page_size_hint,
const FileSelector& select, FileInfoVector* acc_results) {
ARROW_ASSIGN_OR_RAISE(auto base_location, AzureLocation::FromString(select.base_dir));

// The filesystem a.k.a. the container is known to exist so if the path is empty then
// we have already found the base_location, so initialize found to true.
bool found = base_location.path.empty();

auto directory_client = adlfs_client.GetDirectoryClient(base_location.path);
bool found = false;
DataLake::ListPathsOptions options;
options.PageSizeHint = page_size_hint;

Expand Down

0 comments on commit 0e7e966

Please sign in to comment.