nextcloud / files_antivirus

👾 Antivirus app for Nextcloud Files
https://apps.nextcloud.com/apps/files_antivirus
GNU Affero General Public License v3.0
84 stars 35 forks source link

Reset infectedStatus when scanning new item #169

Closed bpatath closed 3 years ago

bpatath commented 3 years ago

Fix #167 by resetting the infectedStatus property of the scanner when starting to scan a new file.

I went ahead and implemented solution two, since it is actually much easier than I thought. Just reset the infectedStatus when using the scan method since it is used by and only by the background scanner, and once per file (versus multiple times per file for the initScanner function).

bpatath commented 3 years ago

@rullzer I see that you are the maintainer. I don't know what the typical Nextcloud timings are, but you may want to merge this quickly, and do a minor release. For users who chose the "delete" action for infected files during background scan, there is a risk that a huge part (potentially all) of the files stored on NC are deleted.

rullzer commented 3 years ago

@rullzer I see that you are the maintainer. I don't know what the typical Nextcloud timings are, but you may want to merge this quickly, and do a minor release. For users who chose the "delete" action for infected files during background scan, there is a risk that a huge part (potentially all) of the files stored on NC are deleted.

Thanks. Sorry this got drowned in my github notifications while I was on holiday back then