Unable to download blob snapshot with a name starting with whitespace #2844
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
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
Expected Experience
The snapshot downloads successfully.
Actual Experience
The following error message appears in the Activity Log:
Additional Context
The error is caused by this line of code in "DownloadBlobs.ts":
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.
The text was updated successfully, but these errors were encountered: