diff options
Diffstat (limited to 'lib/private/Preview/TXT.php')
-rw-r--r-- | lib/private/Preview/TXT.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index 0ae35fb3eec..d55d32386a7 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -52,6 +52,10 @@ class TXT extends ProviderV2 { * {@inheritDoc} */ public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { + if (!$this->isAvailable($file)) { + return null; + } + $content = $file->fopen('r'); if ($content === false) { |