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

Unable to download blob snapshot with a name starting with whitespace #2844

Closed
craxal opened this issue Apr 16, 2020 · 0 comments
Closed

Unable to download blob snapshot with a name starting with whitespace #2844

craxal opened this issue Apr 16, 2020 · 0 comments
Assignees
Labels
💻 windows Related to Windows platforms ⚙️ blobs Related to blob storage ⚙️ data transfer Related to upload, download, copy, etc. ✅ merged A fix for this issue has been merged
Milestone

Comments

@craxal
Copy link
Contributor

craxal commented Apr 16, 2020

Storage Explorer Version: 1.13.0
Build Number: dev
Platform/OS: Windows 10
Architecture: i86
Regression From: N/A

Bug Description

I am unable to download a single snapshot of a blob whose name starts with whitespace.

Example: " space.txt"

Steps to Reproduce

  1. Launch Storage Explorer and open a standard (non-HNS enabled) blob container.
  2. Create a local file from the command line with a space at the beginning of the name:
    New-Item " space.txt"
  3. Upload the file create in step 3.
  4. Create one or two snapshots of the uploaded blob.
  5. Select the uploaded blob and click Manage Snapshots.
  6. Select one of the snapshots and click Download. Select a location to download the snapshot.

Expected Experience

The snapshot downloads successfully.

Actual Experience

The following error message appears in the Activity Log:

Failed to start transfer: Multi-snapshot download is currently not supported.

Additional Context

The error is caused by this line of code in "DownloadBlobs.ts":

let noUnsafeNameIssue = os.platform() !== "win32" || WindowsSafeFileName.isPathSafe(blobs[0].name);

A regular expression in isPathSafe is used to test whether blob names are safe to download to a Windows file system. However, the regular expression erroneously disallows whitespace at the beginning of file names.

At the very least, the error presented is misleading. We should have separate error messages depending on the condition that's violated.

@craxal craxal added ⚙️ blobs Related to blob storage ⚙️ data transfer Related to upload, download, copy, etc. labels Apr 16, 2020
@MRayermannMSFT MRayermannMSFT added this to the 1.14.0 milestone Apr 20, 2020
@JasonYeMSFT JasonYeMSFT added the 💻 windows Related to Windows platforms label May 29, 2020
@MRayermannMSFT MRayermannMSFT modified the milestones: 1.14.0, 1.15.0 Jun 1, 2020
@JasonYeMSFT JasonYeMSFT added the ✅ merged A fix for this issue has been merged label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 windows Related to Windows platforms ⚙️ blobs Related to blob storage ⚙️ data transfer Related to upload, download, copy, etc. ✅ merged A fix for this issue has been merged
Projects
None yet
Development

No branches or pull requests

3 participants