mikeal / node.couchapp.js

Utility for writing couchapps.
Apache License 2.0
406 stars 78 forks source link

Correctly set pending_dirs to support walking subdirectories #70

Closed puls closed 11 years ago

puls commented 11 years ago

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.