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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Tasks/AzureFileCopyV4/Utility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.

$containerURL = $containerURL.Replace('$','`$')
$azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe"

Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFileCopyV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 175,
"Patch": 5
"Minor": 178,
"Patch": 0
},
"demands": [
"azureps"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFileCopyV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 175,
"Patch": 5
"Minor": 178,
"Patch": 0
},
"demands": [
"azureps"
Expand Down