summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-12-02 21:00:05 +0100
committerGitHub <noreply@github.com>2020-12-02 21:00:05 +0100
commit09754461dfd55c08394c1a19c40cf4052e15565a (patch)
tree4347c9497cb14319ab18d6f88e85df55c03cfc76 /apps
parent6f4d3edb5e5bcb343012b378e22500e614c2cc38 (diff)
parentc44ec8c5d584cf16b68c6c2d92ac2b1e4f39f912 (diff)
downloadnextcloud-server-09754461dfd55c08394c1a19c40cf4052e15565a.tar.gz
nextcloud-server-09754461dfd55c08394c1a19c40cf4052e15565a.zip
Merge pull request #24459 from nextcloud/fix/23096/workflow-fix-mimetype-check-for-directories
Only execute plain mimetype check for directories and do the fallback…
Diffstat (limited to 'apps')
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 4e61e5693b9..8d9e2468ebd 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -102,8 +102,12 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
*/
public function executeCheck($operator, $value) {
$actualValue = $this->getActualValue();
- return $this->executeStringCheck($operator, $value, $actualValue) ||
- $this->executeStringCheck($operator, $value, $this->mimeTypeDetector->detectPath($this->path));
+ $plainMimetypeResult = $this->executeStringCheck($operator, $value, $actualValue);
+ if ($actualValue === 'httpd/unix-directory') {
+ return $plainMimetypeResult;
+ }
+ $detectMimetypeBasedOnFilenameResult = $this->executeStringCheck($operator, $value, $this->mimeTypeDetector->detectPath($this->path));
+ return $plainMimetypeResult || $detectMimetypeBasedOnFilenameResult;
}
/**