paths ending in \ on Windows #1565

juandopazo opened this Issue Aug 20, 2011 · 4 comments


None yet

5 participants



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.


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 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 commented Sep 3, 2011

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


Awesome job guys! Thanks!

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