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

Resolve batch download of blobs with names starting with forward slash #6069

Merged
merged 4 commits into from
Apr 10, 2018

Conversation

williexu
Copy link
Contributor

@williexu williexu commented Apr 10, 2018


Closes: #5837

-blob names starting with forward slashes are treated as relative paths.
-if multiple blob names would resolve to the same local file path, a CLIerror is thrown

This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

@williexu williexu added the Storage az storage label Apr 10, 2018
@williexu williexu requested a review from troydai April 10, 2018 07:02
@promptws
Copy link

View a preview at https://prompt.ws/r/Azure/azure-cli/6069
This is an experimental preview for @microsoft users.

normalized_blob_name = normalize_blob_file_path(None, blob_name)
if normalized_blob_name in blobs_to_download:
from knack.util import CLIError
raise CLIError('Multiple blobs with download path: `{}`'.format(normalized_blob_name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Be a bit more detailed.

from knack.util import CLIError
raise CLIError('Multiple blobs with download path: `{}`. As a solution, use the `--pattern` parameter '
'to select for a subset of blobs to download OR utilize the `storage blob download` '
'command instead to download individual blobs.'.format(normalized_blob_name))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@troydai
Copy link
Contributor

troydai commented Apr 10, 2018

good.

@williexu williexu merged commit d93d93f into Azure:dev Apr 10, 2018
@williexu williexu deleted the batchdownload branch April 19, 2018 22:46
@haroldrandom haroldrandom added the Storage az storage label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage az storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

az download-batch tries to create directory on the root filesystem
4 participants