Closed davidebbo closed 12 years ago
What about people who include the drive letter in their root? Does this assume paths start with \
on windows?
Right now, I'm simply omitting that check on Windows:
if (pathSep == "/" && root[0] !== "/") throw new Error("root path must start in /");
This basically says that this extra error check only happens on non-Windows platforms. Ideally, we'd call a path.isrooted() API is there was one, but I don't see one. We could also hand write that logic ourselves (check for c:\bar or \bar or \some\unc), but then we're adding too much Windows specific logic.
So I figured omitting the check is the lesser evil, and it unblocks the use of this module on Windows.
Do you need more info about this? Note that I've tested it on Windows with driver letter path, slash path, and UNC path, and it all seems to work fine.
No, I was just busy. Sorry for the delay.
Thanks! Didn't mean to rush you; just not familiar with the process.
Would I push my luck if I asked for the NPM package to be refreshed with this?
Published as 0.3.10. Thanks for the patch!
That's great, thanks Tim!
I'm now using path.normalize("/") to get the separator since path.sep is not available in Node 0.6.