soldair / node-walkdir

Walk a directory tree emitting events based on the contents. API compatable with node-findit. Walk a tree of any depth. Fast! Handles permission errors. Stoppable. windows support. Pull requests are awesome. watchers are appreciated.
MIT License
131 stars 22 forks source link

doesn't work if trailing slash is omitted #14

Closed andrewrk closed 11 years ago

andrewrk commented 11 years ago

I should be able to do, for example, walk("/home/andy/music")

soldair commented 11 years ago

hmm i have tests for this that are passing. are you sure music exists? https://github.com/soldair/node-walkdir/blob/master/test/async.js#L20

i do this for my music library also. i walkdir then i shuffle the array. to play music i childprocess spawn play which is provided by sox and i spawn dbus-monitor to watch my media keys.

andrewrk commented 11 years ago

ooh I think I might have a clue. for me, my music folder is a softlink:

lrwxrwxrwx 1 andy andy 55 Jul 29 10:06 music -> /media/andy/c8ccffcb-2630-44c7-9356-7a79762133ed/music/

soldair commented 11 years ago

interesting. so i think the worst choice i ever made was not following links by default. {"follow_symlinks":true} and let me know ok?

andrewrk commented 11 years ago

works. sorry for the false accusation. I forgot that dir was a soft link.

soldair commented 11 years ago

no problem man. if anything, like i said, its indicative of an interface design bug. thanks a lot and keep you eye out for more issues. =)

On Mon, Aug 12, 2013 at 9:33 AM, Andrew Kelley notifications@github.comwrote:

works. sorry for the false accusation. I forgot that dir was a soft link.

— Reply to this email directly or view it on GitHubhttps://github.com/soldair/node-walkdir/issues/14#issuecomment-22506316 .