paths ending in \ on Windows #1565

Closed
juandopazo opened this Issue Aug 20, 2011 · 4 comments

Projects

None yet

5 participants

@juandopazo

Hi!

Testing if a path exists when the path ends with a trailing backlash (for example path.exists('C:\node\www\', fn)) always fails. This is affecting pretty much every framework like Connect middlewares that rely on path.exists or fs.Stat#isDirectory.

@bnoordhuis
Member

path.exists('C:\node\www', fn)

That's not a valid string, you need to escape the backslashes: path.exists('C:\\node\\www\\', fn)

@piscisaureus: can you reproduce it?

@ry
ry commented Aug 22, 2011

can reproduce.

It seems that _stat in the CRT is broken with respect to trailing slashes. We might be able to work around this with the new eio interface that @igorzi is doing.

@igorzi
igorzi commented Sep 3, 2011

This should be fixed in libuv with joyent/libuv@25175c7.

@juandopazo

Awesome job guys! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment