Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

paths ending in \ on Windows #1565

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

paths ending in \ on Windows #1565

juandopazo opened this issue Aug 20, 2011 · 4 comments

Comments

@juandopazo
Copy link

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
Copy link
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
Copy link

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
Copy link

igorzi commented Sep 3, 2011

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

@juandopazo
Copy link
Author

Awesome job guys! Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants