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.35k
stars
4.65k
forks
source link
[BUG] DataLakeFileClient.UploadAsync Metadata cannot be an empty dictionary. Has to be null instead. #41903
Library name and version
Azure.Storage.Files.DataLake 12.17.1
Describe the bug
This fails with
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. (Parameter 'startIndex')
:but this works fine:
and the reason is here (the
-1
part when theStringBuilder
is still empty): https://github.com/Azure/azure-sdk-for-net/blob/675cf1fc091d02e385f4f8455beab2e9a40adc58/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs#L750C13-L750C41Expected behavior
Works with metadata set to an empty dictionary
Actual behavior
Reproduction Steps
Environment
No response