Skip to content

[BUG] [Storage] [DataMovement] Local folder uploaded to Blob target contains extra subfolder #52457

@tomikiss

Description

@tomikiss

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

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageService AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions