aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-10-27 14:26:31 +0200
committerGitHub <noreply@github.com>2021-10-27 14:26:31 +0200
commit1666bb0790f6af028e4d82bf327f3e77fe220848 (patch)
treed9e791777dc7009eda5d1a23e27c327a2887e36b
parent3f8ca991fce8584025e26c3944e2216cd89b85ee (diff)
parent7a6d559f19bf68b280375be4086043b69051b72b (diff)
downloadnextcloud-server-1666bb0790f6af028e4d82bf327f3e77fe220848.tar.gz
nextcloud-server-1666bb0790f6af028e4d82bf327f3e77fe220848.zip
Merge pull request #29454 from nextcloud/bugfix/noid/detect-mimetype-by-content-only-with-content
Detect mimetype by content only with content
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 2fa0361f3b4..42b93bd9513 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -127,7 +127,7 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
return $this->cacheAndReturnMimeType($this->storage->getId(), $this->path, 'httpd/unix-directory');
}
- if ($this->storage->file_exists($this->path)) {
+ if ($this->storage->file_exists($this->path) && $this->storage->filesize($this->path)) {
$path = $this->storage->getLocalFile($this->path);
$mimeType = $this->mimeTypeDetector->detectContent($path);
return $this->cacheAndReturnMimeType($this->storage->getId(), $this->path, $mimeType);