Skip to content

handle IO Exception as non-terminating #10950

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

Merged
merged 1 commit into from
Nov 1, 2019

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