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

Wrong error message returned during blob to blob copy when file not found #1830

Closed
kevlarmpowered opened this issue Jun 16, 2022 · 1 comment · Fixed by #1412
Closed

Wrong error message returned during blob to blob copy when file not found #1830

kevlarmpowered opened this issue Jun 16, 2022 · 1 comment · Fixed by #1412
Assignees

Comments

@kevlarmpowered
Copy link

kevlarmpowered commented Jun 16, 2022

Which version of the AzCopy was used?

azcopy version 10.15.0

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

$sourcesastoken = New-AzStorageAccountSASToken -Context $sourcestoragecontext -Service Blob -ResourceType Service,Container,Object -Permission "rl" -StartTime $ContainerStartDate -ExpiryTime $ContainerEndDate
$targetsastoken= New-AzStorageAccountSASToken -Context $targetstoragecontext -Service Blob -ResourceType Service,Container,Object -Permission "rwdl" -StartTime $ContainerStartDate -ExpiryTime $ContainerEndDate

$source = "https://mysource.blob.core.windows.net/sourcecontainer/non-existant-file.txt' +$sourcesastoken
$target = "https://mytarget.blob.core.windows.net/targetcontainer/' +$targetsastoken

.\azcopy.exe cp $source $target

What problem was encountered?

azcopy returns the error "failed to perform copy command due to error: cannot use directory as source without --recursive or a trailing wildcard (/*)" when the file in the source does not exist instead of "file not found"

How can we reproduce the problem in the simplest way?

Try to do a blob to blob copy with SAStoken at the source and target where the source file is missing or does not exist in the source blob.

Have you found a mitigation/solution?

Use the right URL to point to the file I want to copy... This was totally user error, but the user error exposed a wrongly returned error message.

@nakulkar-msft
Copy link
Contributor

#1418

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 a pull request may close this issue.

2 participants