mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 13:23:11 -04:00
Merge pull request #29458 from nextcloud/backport/29454/stable21
This commit is contained in:
commit
e4e35107b0
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue