Skip to content

Commit

Permalink
Merge pull request #29457 from nextcloud/backport/29454/stable20
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Oct 28, 2021
2 parents a463d51 + c363479 commit 2835f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/workflowengine/lib/Check/FileMimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function getActualValue() {
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);
Expand Down

0 comments on commit 2835f62

Please sign in to comment.