Path with no slash after drive letter and colon - what does it point to?
- by ya23
I have mistyped a path and instead of c:\foo.txt wrote c:foo.txt. I expected it to either fail or to resolve to c:\foo.txt, but instead it seems to be resolved to foo.txt in a current user's home folder.
Powershell returns:
PS C:\> [System.IO.Path]::GetFullPath("c:\foo.txt")
c:\foo.txt
PS C:\> [System.IO.Path]::GetFullPath("c:foo.txt")
C:\Users\Administrator\foo.txt
PS C:\> [System.IO.Path]::GetFullPath("g:foo.txt")
G:\foo.txt
Running explorer.exe from commandline and passing it any of the above results in C:\Users\Administrator\Documents to be opened.
I haven't found any documentation of that and I'm utterly confused, please explain the behaviour.