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
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-26 14:21:40 +0300
committerGitHub <noreply@github.com>2018-11-26 14:21:40 +0300
commitde835bf2f26e0ab11ebdf0d815d1cf0b04c82cc4 (patch)
treee6dea3bd9d4a3600560a5660dac9fb484090d9c0
parentb105400720bc23b9ca8ff8bcc1c9e1dc6ea46a7c (diff)
parent4b37a2449d72689819d81f4db5556cf5426d3447 (diff)
Merge pull request #109 from nextcloud/14/shared_fixv1.4.2
Fix shared folder upload in 14
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/AvirWrapper.php7
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.
]]></description>
- <version>1.4.1</version>
+ <version>1.4.2</version>
<licence>agpl</licence>
<author>Manuel Delgado</author>
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();