10BC0 handle IO Exception as non-terminating by SteveL-MSFT · Pull Request #10950 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Oct 30, 2019

PR Summary

FileSystemProvider CopyItem was only handling UnauthorizedAccessException. However, if a file is in use and can't be overwritten it's an IOException which is then unhandled and stops a recursive copy. Fix is to catch IOException and emit an ErrorRecord and continue.

PR Context

Fix #2474

PR Checklist

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Oct 30, 2019
@adityapatwardhan adityapatwardhan merged commit a3d73d7 into PowerShell:master Nov 1, 2019
@adityapatwardhan adityapatwardhan added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 1, 2019
@adityapatwardhan adityapatwardhan added this to the 7.0.0-preview.6 milestone Nov 1, 2019
@SteveL-MSFT SteveL-MSFT deleted the copy-item-inuse branch November 1, 2019 17:19
@ghost
Copy link
ghost commented Nov 21, 2019

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copy-item does not respect -ErrorAction SilentlyContinue if file is in use

2 participants

0