-
Notifications
You must be signed in to change notification settings - Fork 253
Allow copies with leading slash or no name virtual dirs #3294
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
base: main
Are you sure you want to change the base?
Conversation
//blob
//blobThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes silent failures when copying from unnamed virtual directories or blobs with leading slashes (e.g., //blob). Previously, AzCopy would normalize these paths causing 404 errors that were silently ignored. The fix adds proper error detection and reporting.
Key Changes:
- Added error handling in
listTraverser.Traverse()to catch and report FILE_NOT_FOUND errors - Implemented tracking of processed vs skipped items to return an error when nothing is successfully processed
- Added warning messages to inform users about leading slash issues in blob names
- Added comprehensive E2E tests covering various scenarios with unnamed directories and leading slashes
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| traverser/zc_traverser_list.go | Adds error handling for IsDirectory() calls and tracks processed/skipped items to avoid silent failures |
| e2etest/zt_newe2e_blob_test.go | Adds E2E tests for unnamed virtual directories and leading slash scenarios |
| cmd/copyUtil.go | Adds warning message when detecting leading slash patterns in blob URLs |
| cmd/copyEnumeratorInit.go | Minor formatting change (blank line addition) |
| cmd/copy.go | Typo fix in TODO comment: "preservePermissinos" → "preservePermissions" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adreed-msft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Description
Handles copies from un-named virtual directories or blob with leading slashes e.g
//blobFeature / Bug Fix: (Brief description of the feature or issue being addressed)
Related Links:
PBI Item
Team thread
Type of Change
How Has This Been Tested?
Thank you for your contribution to AzCopy!