Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_antivirus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorbpatath <github@bp.patathouse.fr>2020-09-23 22:52:43 +0300
committerbpatath <github@bp.patathouse.fr>2020-09-24 10:37:18 +0300
commit2514594035a4063fc72337f05b2f171ce8ad8eb6 (patch)
treedd588494ff3c36751ad78b0561f6cec459f34730 /lib
parent966bba64e6c4caaf7ad2dbb82a1e70ec8ce4453a (diff)
Reset infectedStatus when scanning new item
Signed-off-by: bpatath <github@bp.patathouse.fr>
Diffstat (limited to 'lib')
-rw-r--r--lib/Scanner/ScannerBase.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Scanner/ScannerBase.php b/lib/Scanner/ScannerBase.php
index 5bd91ca..82f6a0a 100644
--- a/lib/Scanner/ScannerBase.php
+++ b/lib/Scanner/ScannerBase.php
@@ -106,6 +106,7 @@ abstract class ScannerBase implements IScanner {
* @return Status
*/
public function scan(Item $item): Status {
+ $this->infectedStatus = null;
$this->initScanner();
while (false !== ($chunk = $item->fread())) {
@@ -117,6 +118,7 @@ abstract class ScannerBase implements IScanner {
}
public function scanString(string $data): Status {
+ $this->infectedStatus = null;
$this->initScanner();
$this->writeChunk($data);