Skip to content

Commit

Permalink
fix: Avoid failing with duplicate checks
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 23, 2023
1 parent 710c593 commit d1c07c6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions apps/workflowengine/lib/Check/FileMimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,7 @@ protected function cacheAndReturnMimeType(string $storageId, ?string $path, stri
* @return bool
*/
public function executeCheck($operator, $value) {
$actualValue = $this->getActualValue();
$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;
return $this->executeStringCheck($operator, $value, $this->getActualValue());
}

/**
Expand Down

0 comments on commit d1c07c6

Please sign in to comment.