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: file is always null when using a server via tcp #112

Closed Gamewalker closed 5 months ago

Gamewalker commented 1 year ago

fix: file is always null when a file is turned into a stream and then sent to a server

renchey commented 1 year ago

I still had issues with this, but it pointed me in the right direction!

The following worked for me as I was using a callback

return hasCb ? cb(null, file, {...isInfected, file}, []) : resolve({ ...isInfected, file});

kylefarris commented 5 months ago

Looks great! Thanks! (And sorry for the delay)