-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the product
Milestone
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
The recent change to Move-Item (PR #15077) is causing regressions on Windows platforms as reported by WSD.
The recent change of catching all IOException and retry is causing infinite recursion in some move cases.
I suggest we consider moving back to the original code that tries to detect (Windows platform code path) when MoveTo or CopyAndDelete should be used, and add additional error handling to that, if needed.
Expected behavior
cd c:\
mkdir 0
Move-Item 0 0
Move-Item : The process cannot access the file because it is being used by another process.
# Expected error is returned.Actual behavior
cd c:\
mkdir 0
Move-Item 0 0
Ctrl+C
# Move-Item runs recursion indefinitely, continually creating '0' subdirectories.
Move-Item 0 0\1
Ctrl+C
# Move-Item runs recursion indefinitely, continually creating '1' subdirectories.Error details
Unexpected errorEnvironment data
PSVersion 7.2.0-preview.9
PSEdition Core
GitCommitId 7.2.0-preview.9-14-g403767d7f7b910a6f315505287fe9a72c3960c52
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the product