This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.37k
stars
4.79k
forks
source link
[BUG] ShareDirectoryClient.GetFileClient() doesn't support trailing dot in Windows Powershell 5 session #46749
In PSH 7 window or PowerShell ISE, ShareDirectoryClient.GetFileClient() supports trailing dot. When the file path input has trailing dots, the Uri returned by the method has the trailing dots. For example, in PSH 7:
However, in PowerShell 5, the trailing dots are removed when calling GetFileClient on a ShareDirectoryClient:
Expected behavior
In PowerShell 5, trailing dots should also be supported. When the path taken by GetFileClient has trailing dots, the Uri returned by the method should contain the trailing dots.
Actual behavior
In PowerShell 5, trailing dots are removed when calling GetFileClient(). However, in PowerShell 7, trailing dots are supported and the Uri returned contains the trailing dots as expected.
Reproduction Steps
Get a ShareDirectoryClient
Call GetFileClient method with a file path with trailing dots, like "filename1..."
Library name and version
Azure.Storage.Files.Shares 12.16.0
Describe the bug
In PSH 7 window or PowerShell ISE,
ShareDirectoryClient.GetFileClient()
supports trailing dot. When the file path input has trailing dots, the Uri returned by the method has the trailing dots. For example, in PSH 7:However, in PowerShell 5, the trailing dots are removed when calling GetFileClient on a ShareDirectoryClient:
Expected behavior
In PowerShell 5, trailing dots should also be supported. When the path taken by
GetFileClient
has trailing dots, the Uri returned by the method should contain the trailing dots.Actual behavior
In PowerShell 5, trailing dots are removed when calling
GetFileClient()
. However, in PowerShell 7, trailing dots are supported and the Uri returned contains the trailing dots as expected.Reproduction Steps
GetFileClient
method with a file path with trailing dots, like "filename1..."Environment
No response