]> source.dussan.org Git - nextcloud-server.git/commitdiff
consider local external storages, too 24703/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Tue, 15 Dec 2020 10:50:04 +0000 (11:50 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Tue, 15 Dec 2020 10:50:04 +0000 (11:50 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/workflowengine/lib/Check/FileName.php

index 893a9a72605f12511226ae46fdb4d72f7c54d610..9a564f85f631e7ea3f26a00fa46180ac182197e1 100644 (file)
@@ -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') {