Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtual directories are not created in AzureFileCopyV4 using blob prefix #13784

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

AmrutaKawade
Copy link
Contributor

@AmrutaKawade AmrutaKawade commented Oct 27, 2020

Task name: AzureFileCopyV4

Description: Added "/" at the end of destination blob storage url

Documentation changes required: (Y/N) N

Added unit tests: (Y/N) N

Attached related issue: (Y/N) https://developercommunity.visualstudio.com/content/problem/1109500/azure-file-copy-task-drops-file-name-when-using-pr.html

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@AmrutaKawade AmrutaKawade merged commit 0e9c3c6 into master Oct 27, 2020
@@ -214,6 +214,7 @@ function Upload-FilesToAzureContainer

$blobPrefix = $blobPrefix.Trim()
$containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/")
$containerURL = $containerURL + "/"
Copy link
Member

@jiasli jiasli Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR and after #13976, $containerURL will never end with /. After this PR, $containerURL will always end with /.

I think a better solution would be not to trim / at L216 at all. Instead of calling it "Blob Prefix", call it "Destination". Keep it as is and pass it to azcopy. Leave its interpretation to azcopy: If 20220328.38/yum/, treat it as virtual directory. If 20220328.38/yum, treat it as blob name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants