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
This is standard DOS/Windows behavior and has always been like this. Open a command line and see:
C:\Users\Tim>d: # change current drive to d:
D:\>c: # change back to c: - back in the same directory
C:\Users\Tim>cd d:\users # change current directory ON D:
C:\Users\Tim>cd \ # still same directory - backslash leads to top dir
C:\>d: # change current drive to d:
D:\Users> # notice that we're now in the directory D:\Users
The drive letter always references the current directory of that drive; the (leading) backslash gets you to the top directory.