Fix error when using Get-ChildItem c:#7033
Fix error when using Get-ChildItem c:#7033adityapatwardhan merged 9 commits intoPowerShell:masterfrom
Conversation
|
@sethvs Please push an empty commit to trigger another build since there seemed to be a sporadic problem that caused the build to hang and timeout. You could do this for example as follows, I recommend putting @iSazonov This happened to me last week as well that a build got into a hanging state. Have you see that before as well or is this probably caused by a recently added test? |
|
@bergmeister Do you mean a problem only with CIs (not local)? |
|
@iSazonov I mean the |
|
@sethvs After fixing current test failures in New-Item.Tests.ps1, please do a [feature] commit as @bergmeister suggested. Those namespaces APIs is a very fragile piece of code; so we need to run as many tests as we can to ensure that nothing gets broken by these changes. |
|
@anmenaga OK. |
|
Update-Help and PowerShellGet tests fail. |
|
@iSazonov OK, will take a look. |
|
@adityapatwardhan @iSazonov I'm afraid I can't allocate much time at the moment. So let's split fixing #6149 to another PR in order not to delay this one. I'm going to address it later. |
|
Empty commit to restart tests. |
|
@rjmholt Can you have a look too? |
|
@adityapatwardhan No, it is not fixed. |
rjmholt
left a comment
There was a problem hiding this comment.
Going to build this branch and have a look at it, but it looks good so far.
| { | ||
| PSTraceSource.NewArgumentNullException("paths"); | ||
| } | ||
| else if (path.EndsWith((":" + Path.DirectorySeparatorChar), StringComparison.Ordinal) || path.EndsWith((":" + Path.AltDirectorySeparatorChar), StringComparison.Ordinal)) |
There was a problem hiding this comment.
Might be worth hanging a line for the second path check.
rjmholt
left a comment
There was a problem hiding this comment.
Ok, I've put this branch through a test run and got no unusual failures. This looks good to me!
PR Summary
Fix #7032, #7048
Get-ChildItem c: throws an error. #7032
When creating file using -Path c: without a backslash, file created in the drive root and not in the current folder. #7048
Windows PowerShell 5.1: file is created in current path - C:\Folder
PowerShell Core 6.0.2: file is created in current path - C:\Folder
PowerShell Core 6.1.0-preview.2: file is created in current path - C:\Folder
PowerShell Core 6.1.0-preview.3: file is created in root path - C:\
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests