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
236 stars 69 forks source link

get_version() Promise problem #47

Closed benzino77 closed 4 years ago

benzino77 commented 4 years ago

Hi there,

get_version() function does not return reject in case of error https://github.com/kylefarris/clamscan/blob/5f557c970817fe8c578ec3f7ad3bcbcef4cf5538/index.js#L690

I think that it should be return (has_cb ? cb(err, null) : reject(err));

kylefarris commented 4 years ago

I believe you're right. Surprised the unit tests didn't catch this.

benzino77 commented 4 years ago

Thanks for a merge!

kylefarris commented 4 years ago

No problem!

I'll get a new patched version out tomorrow. Going to try to get a few other minor bugs/issues put into it.