Repository navigation
Fix Windows COPY --parents with skip protected system files - #6369
Merged
Merged
Conversation
rzlink
force-pushed
the
fix-windows-copy-with-protected-files
branch
from
November 17, 2025 23:59
6cf5edd to
a5aebfe
Compare
tonistiigi
reviewed
Nov 24, 2025
tonistiigi
left a comment
Member
There was a problem hiding this comment.
Could this be simplified when integrating directly to copy.Copy where it already calls RootPath and ReadDir ?
Collaborator
Author
Yes, it will simplify to: func platformCopy(ctx context.Context, srcRoot string, src string, destRoot string, dest string, opt ...copy.Opt) error {
// Add Windows protected files to exclude patterns
opt = append(opt,
copy.WithExcludePattern("System Volume Information"),
copy.WithExcludePattern("WcSandboxState"),
)
return copy.Copy(ctx, srcRoot, src, destRoot, dest, opt...)
} |
rzlink
force-pushed
the
fix-windows-copy-with-protected-files
branch
from
December 11, 2025 23:17
a5aebfe to
1ddae48
Compare
rzlink
force-pushed
the
fix-windows-copy-with-protected-files
branch
from
December 11, 2025 23:40
1ddae48 to
8113867
Compare
tonistiigi
reviewed
Dec 12, 2025
Fixes copying from Windows container mount roots by detecting and skipping
protected system files ('System Volume Information' and 'WcSandboxState')
that cause 'Access is denied' errors.
Changes:
- Added platformCopy wrapper for Windows copy operations
- Implemented manual directory enumeration to skip protected files
- Enabled test case testCopyRelativeParents and testCopyParentsMissingDirectory on Windows
The fix is Windows-specific and only activates when copying from mount roots
where protected files exist. All other copy operations use the standard path.
Issue: Resolves moby#6635 [v0.26] WCOW: Fix COPY --parents tests
Signed-off-by: Dawei Wei <wei.dawei.cn@gmail.com>
rzlink
force-pushed
the
fix-windows-copy-with-protected-files
branch
from
December 16, 2025 18:47
8113867 to
32850da
Compare
jsternberg
approved these changes
Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes copying from Windows container mount roots by detecting and skipping protected system files ('System Volume Information' and 'WcSandboxState') that cause 'Access is denied' errors.
Changes:
platformCopywrapper for Windows copy operationstestCopyRelativeParentsandtestCopyParentsMissingDirectoryon WindowsThe fix is Windows-specific and only activates when copying from mount roots where protected files exist. All other copy operations use the standard path.
Issue: Resolves #6635 [v0.26] WCOW: Fix COPY --parents tests