mikeal/node.couchapp.js — pull request #70 by puls (2013-04-28 23:41:18+00:00)
Title: Correctly set pending_dirs to support walking subdirectories

I noticed when running couchapp that sometimes I wouldn't get all of my attachments, especially the ones in subdirectories.

I tracked this down to the attached code; the callback from `push` gets called whenever `pending_dirs` is zero, but it doesn't take in to account that the callback from `watch.walk` could happen more times than there are attachments.