-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Library name and version
Azure.Storage.DataMovement.Blobs 12.2.1
Describe the bug
Hi,
When using storage data movements with local directory to BlobStorage the target blob storage contains an extra subdirectory called a or ta (randomly).
Expected behavior
All file created to a target path in container no subfolder created
Actual behavior
Extra subfolder created which named normally a or ta, if the target path has trailing slash folder created called
Reproduction Steps
Create a folder called debug with 2 files
Set target upload to be a subfolder on the container
Target container has an extra subdirectory - instead of the files from the source directory.
`
var transferManager = new TransferManager(new TransferManagerOptions()
{
CheckpointStoreOptions = TransferCheckpointStoreOptions.DisableCheckpoint(),
Diagnostics = { IsLoggingEnabled = true}
}));
var transferOptions = new TransferOptions()
{
CreationMode = StorageResourceCreationMode.OverwriteIfExists,
};
var blobContainerOptions = new BlobStorageResourceContainerOptions()
{
BlobPrefix = "subfolder-1/subfolder-2",
BlobType = BlobType.Block
};
var blobContainerClient = new BlobServiceClient('URI-here', new DefaultAzureCredential());
StorageResource blobDirectory = BlobsStorageResourceProvider.FromClient(blobContainerClient, blobContainerOptions);
StorageResource localDirectory = LocalFilesStorageResourceProvider.FromDirectory("debug");
TransferOperation transfer = await transferManager.StartTransferAsync(
localDirectory,
blobDirectory,
transferOptions,
CancellationToken.None).ConfigureAwait(false);
await transfer.WaitForCompletionAsync(CancellationToken.None).ConfigureAwait(false);
`
Environment
.net 9 - 9.0.8