[BUG] DataLakeFileClient Upload / UploadAsync fail on readonly files #14608
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
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Describe the bug
There are 3 places in
DataLakeFileClient
where aFileStream
is created with unnecessary write access (implicit by the latter's ctor):azure-sdk-for-net/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs
Line 3111 in 322f695
azure-sdk-for-net/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs
Line 3227 in 322f695
azure-sdk-for-net/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs
Line 3439 in 322f695
This will cause failures when trying to upload readonly files.
Windows sample stack trace:
OSX sample stack trace:
To Reproduce
Call one of the
DataLakeFileClient::UploadAsync
/DataLakeFileClient::Upload
overrides which accepts a file name (string
)Workaround
Use one of the
DataLakeFileClient::UploadAsync
/DataLakeFileClient::Upload
overrides accepting aStream
, and pass itFile.OpenRead(path)
The text was updated successfully, but these errors were encountered: