Skip to content

Conversation

@wonwuakpa-msft
Copy link
Member

@wonwuakpa-msft wonwuakpa-msft commented Nov 17, 2025

Description

Handles copies from un-named virtual directories or blob with leading slashes e.g //blob

  • Feature / Bug Fix: (Brief description of the feature or issue being addressed)

  • Related Links:

  • PBI Item

  • Team thread

Type of Change

  • Bug fix
  • New feature
  • Documentation update required
  • Code quality improvement
  • Other (describe):

How Has This Been Tested?

Thank you for your contribution to AzCopy!

@wonwuakpa-msft wonwuakpa-msft changed the title Fix issues with silent failures with no-name virtual dirs Fix silent failures with leading slash or no name virtual dirs //blob Nov 18, 2025
@wonwuakpa-msft wonwuakpa-msft changed the title Fix silent failures with leading slash or no name virtual dirs //blob Fix silent failures with leading slash or no name virtual dirs Nov 18, 2025
Copy link
Contributor

Copilot AI left a 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.

Copy link
Member

@adreed-msft adreed-msft left a comment

Choose a reason for hiding this comment

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

Nice!

@wonwuakpa-msft wonwuakpa-msft changed the title Fix silent failures with leading slash or no name virtual dirs Allow copies with leading slash or no name virtual dirs Nov 26, 2025
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 this pull request may close these issues.

4 participants