On Windows, listing the root directory of a disk like D:/* shows the content of the current working directory as it was under D:/ (see below the content of dirBad).
I had to apply the workaround in dirGood to obtain the real content.
Expected behavior
List the content of the root directory.
Steps to reproduce
Externally look at the content of current working directory (e.g., D:/project/node_modules ...)
Run the code below
Look at dirGood. It contains the true content of the root directory (D:/./$RECYCLE.BIN)
Look at dirBad. It contains the current directory content as if D:/ were equivalent to ./
Environment
Actual behavior
On Windows, listing the root directory of a disk like
D:/*
shows the content of the current working directory as it was underD:/
(see below the content of dirBad). I had to apply the workaround in dirGood to obtain the real content.Expected behavior
List the content of the root directory.
Steps to reproduce
D:/project/node_modules ...
)D:/./$RECYCLE.BIN
)D:/
were equivalent to./
Code sample