aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-12-15 11:50:04 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-12-18 10:48:46 +0000
commitb432a9f5da6dd6286aabfba154e5dbabb89c516e (patch)
tree8f2531f8b3e9c770d2e94b82440254b1deed25a4
parentc0c88e3bd84e0434e2cf704f973109ef7b67df02 (diff)
downloadnextcloud-server-b432a9f5da6dd6286aabfba154e5dbabb89c516e.tar.gz
nextcloud-server-b432a9f5da6dd6286aabfba154e5dbabb89c516e.zip
consider local external storages, too
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--apps/workflowengine/lib/Check/FileName.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php
index 893a9a72605..9a564f85f63 100644
--- a/apps/workflowengine/lib/Check/FileName.php
+++ b/apps/workflowengine/lib/Check/FileName.php
@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace OCA\WorkflowEngine\Check;
+use OC\Files\Storage\Local;
use OCA\WorkflowEngine\Entity\File;
use OCP\Files\Mount\IMountManager;
use OCP\IL10N;
@@ -52,7 +53,7 @@ class FileName extends AbstractStringCheck implements IFileCheck {
*/
protected function getActualValue(): string {
$fileName = $this->path === null ? '' : basename($this->path);
- if ($fileName === '' && !$this->storage->isLocal()) {
+ if ($fileName === '' && (!$this->storage->isLocal() || $this->storage->instanceOfStorage(Local::class))) {
// Return the mountpoint name of external storages that are not mounted as user home
$mountPoints = $this->mountManager->findByStorageId($this->storage->getId());
if (empty($mountPoints) || $mountPoints[0]->getMountType() !== 'external') {