From: Alexander Ebert Date: Wed, 14 Aug 2024 13:13:06 +0000 (+0200) Subject: Fix the test for missing thumbnails X-Git-Tag: 6.1.0_Alpha_2~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f5ba72ae23ad56044fe7c62f0e504da075b5857;p=GitHub%2FWoltLab%2FWCF.git Fix the test for missing thumbnails --- diff --git a/wcfsetup/install/files/lib/data/file/thumbnail/FileThumbnail.class.php b/wcfsetup/install/files/lib/data/file/thumbnail/FileThumbnail.class.php index 6158ce4503..f555c56f2a 100644 --- a/wcfsetup/install/files/lib/data/file/thumbnail/FileThumbnail.class.php +++ b/wcfsetup/install/files/lib/data/file/thumbnail/FileThumbnail.class.php @@ -6,7 +6,6 @@ use wcf\data\DatabaseObject; use wcf\data\ILinkableObject; use wcf\system\application\ApplicationHandler; use wcf\system\file\processor\ThumbnailFormat; -use wcf\system\request\LinkHandler; /** * @author Alexander Ebert @@ -61,6 +60,10 @@ class FileThumbnail extends DatabaseObject implements ILinkableObject return true; } + if (!\is_readable($this->getPath() . $this->getSourceFilename())) { + return true; + } + $fileHash = \hash_file('sha256', $this->getPath() . $this->getSourceFilename()); if ($this->fileHash !== $fileHash) { return true;