From 4b37a2449d72689819d81f4db5556cf5426d3447 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 26 Nov 2018 12:17:26 +0100 Subject: Fix shared folder upload in 14 Signed-off-by: Roeland Jago Douma --- appinfo/info.xml | 2 +- lib/AvirWrapper.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 87a902d..f780073 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -13,7 +13,7 @@ This application inspects files that are uploaded to Nextcloud for viruses before they are written to the Nextcloud storage. If a file is identified as a virus, it is either logged or not uploaded to the server. The application relies on the underlying ClamAV virus scanning engine, which the admin points Nextcloud to when configuring the application. For this app to be effective, the ClamAV virus definitions should be kept up to date. Also note that enabling this app will impact system performance as additional processing is required for every upload. More information is available in the Antivirus documentation. ]]> - 1.4.1 + 1.4.2 agpl Manuel Delgado diff --git a/lib/AvirWrapper.php b/lib/AvirWrapper.php index 051cd8b..a90f78d 100644 --- a/lib/AvirWrapper.php +++ b/lib/AvirWrapper.php @@ -81,7 +81,12 @@ class AvirWrapper extends Wrapper{ * - if it is a homestorage it starts with files/ * - if it is not a homestorage we always wrap (external storages) */ - if ($this->shouldScan && is_resource($stream) && $this->isWritingMode($mode) && (!$this->isHomeStorage || strpos($path, 'files/') === 0)) { + if ($this->shouldScan + && is_resource($stream) + && $this->isWritingMode($mode) + && (!$this->isHomeStorage + || strpos($path, 'files/') === 0 + || strpos($path, '/files/') === 0)) { try { $scanner = $this->scannerFactory->getScanner(); $scanner->initScanner(); -- cgit v1.2.3