diff options
Diffstat (limited to 'lib/private/preview.php')
-rw-r--r-- | lib/private/preview.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index a586c94fd11..c7ef00652aa 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -200,14 +200,15 @@ class Preview { /** * set the path of the file you want a thumbnail from * @param string $file - * @return \OC\Preview $this + * @return $this */ public function setFile($file) { $this->file = $file; $this->info = null; + if ($file !== '') { $this->getFileInfo(); - if($this->info !== null && $this->info !== false) { + if($this->info instanceof \OCP\Files\FileInfo) { $this->mimeType = $this->info->getMimetype(); } } |