FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

handle IO Exception as non-terminating by SteveL-MSFT · Pull Request #10950 · PowerShell/PowerShell · GitHub

handle IO Exception as non-terminating - #10950

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:copy-item-inuse
Nov 1, 2019
Merged

handle IO Exception as non-terminating#10950
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:copy-item-inuse

Conversation

Steve Lee (SteveL-MSFT) commented Oct 30, 2019
edited
Loading

Copy link
Copy Markdown
Member

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 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
Aditya Patwardhan (adityapatwardhan) merged commit a3d73d7 into PowerShell:master Nov 1, 2019
Aditya Patwardhan (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
Steve Lee (SteveL-MSFT) deleted the copy-item-inuse branch November 1, 2019 17:19

Copy link
Copy Markdown

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

Handy links:

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

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


Back | FazBrowse Home | New Git URL