If I pass glob a search spec that includes a drive letter, it returns an empty array.
[ '\\temp/1.txt' ]
The two queries should return the same results (since C: is the current drive), but when I specify the full path including drive letter, glob returns nothing.
Confirmed. That is a bug.
The basic problem seems to be here:
read = prefix = path.join("/", prefix)
Essentially this turns it into /c:/temp/ which ain't right.
If I skip that for win32 (basically ignoring UNC, drives, etc.), and just use the else branch, it works fine. That said, I'm not really interested in all the other features (like mounting) that this might possibly break, so probably nothing patch quality...
This is somewhat related to issue 40.
Actually, there's also another issue. Using e.g. c:/* splits into:
Which of course has a different meaning on Windows. c:* means current directory, c:* means root of c:. This could affect any drive letter. I was able to work around this with basically this in the default case:
if (process.platform == "win32" && prefix.length === 2 && prefix === ":")
Though I'm not sure if this is a complete fix either.
fix Issue #42
Working on latest release.