kylefarris / clamscan

A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
MIT License
230 stars 68 forks source link

fix: solve the lock due to promise returned in a promise #96

Closed Annubis45 closed 2 years ago

Annubis45 commented 2 years ago

when scanDir was called, it was returning a promise that calls scanFiles. But scanFiles returns a promise also. Solved by awaiting the return of scanFiles call and resolving correctly the promise of scanDir.

kylefarris commented 2 years ago

Excellent. I'll give this PR a spin and make sure everything is kosher. Not sure why the test suite didn't pick this issue up so I may need to add a new test or adjust a current one to make sure the intended functionality is working as expected from here on out.

kylefarris commented 2 years ago

Fixes #87

kylefarris commented 2 years ago

For the record, this fix was pushed out in v2.1.1. Thank you for your contribution!