[BUG] sourceUriBuilder.DirectoryOrFilePath is not escaped when building renameSource URL #14402
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Data Lake Storage Gen2
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Describe the bug
Trying to rename a path containing spaces results in "The source URI is invalid." error from server.
Apparently the same exact bug was reported and fixed in the Java SDK in March:
Azure/azure-sdk-for-java#8761
https://github.com/Azure/azure-sdk-for-java/pull/8887/files#diff-0fc00850cd2388279fd01c5f427d6cfcR506
Probably just need
sourceUriBuilder.DirectoryOrFilePath.EscapePath()
here.azure-sdk-for-net/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs
Line 1607 in 8451bb7
Expected behavior
No error from server and rename being successful.
Actual behavior (include Exception or Stack Trace)
Error from server "The source URI is invalid"
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
Environment:
The text was updated successfully, but these errors were encountered: