Skip to content

Double URL encoding for the directory path when calling DataLakeDirectoryClient::ListPaths #6930

@adam-roughton

Description

@adam-roughton

Describe the bug
When using a DirectoryClient created by a FileSystemClient, the directory path gets double url-encoded when calling ListPaths.

For example, if the directory path dataset/timestamp=2026-01-25T0000+1300/v3 is passed to GetDirectoryClient:

  1. It will be encoded to dataset/timestamp=2026-01-25T0000%2B1300/v3 (via UrlEncodePath) before being stored in m_pathUrl of the DirectoryClient.
  2. In ListPaths, the directory path is extracted from m_pathUrl (without decoding) and assigned to the Path variable of the options (ListFileSystemPathsOptions) passed to the REST client.
  3. The REST client (re-)encodes the path as the directory query parameter to dataset/timestamp=2026-01-25T0000%252B1300/v3, this time with UrlEncodeQueryParameter.

To Reproduce
Call GetDirectoryClient with a directory path that has characters that would be encoded by UrlEncodePath (e.g. +), and then call ListPaths.

Expected behavior
The directory path should be decoded before re-encoding as a query parameter.

Setup (please complete the following information):

Additional context
I'm hitting this bug via both Apache Arrow (AzureFileSystem) and duckdb-azure which both use the azure-sdk-for-cpp library.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions