aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-12-03 09:15:33 +0100
committerGitHub <noreply@github.com>2020-12-03 09:15:33 +0100
commit80efa644f6f0696f295625f8da0573a288ce18fc (patch)
tree888567400e474ecacd57f15e5145f4c20186e728
parentc4d29cc3f155e4a0bb318a0cddc7b5997fc427b9 (diff)
parenta305573abd79e38ba7337549369b5c21f1ff91ab (diff)
downloadnextcloud-server-80efa644f6f0696f295625f8da0573a288ce18fc.tar.gz
nextcloud-server-80efa644f6f0696f295625f8da0573a288ce18fc.zip
Merge pull request #24518 from nextcloud/backport/24459/stable19
[stable19] Only execute plain mimetype check for directories and do the fallback…
-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;
}
/**