From: Marcel Werk Date: Wed, 31 Mar 2021 09:16:59 +0000 (+0200) Subject: Preview images and cover photos were exported twice X-Git-Tag: 5.3.6~30 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3dc58a23d2dc25822daa9d5b9e28d114ae85a58;p=GitHub%2FWoltLab%2FWCF.git Preview images and cover photos were exported twice --- diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index e8cc533f41..25cdd75360 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -916,7 +916,11 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject /** @var \SplFileInfo $file */ if (!$file->isFile()) continue; if (!$regEx->match($file->getPathName())) continue; - + // Skip preview images and cover photos. + if ($this->image && FileUtil::unifyDirSeparator($file->getPathname()) === FileUtil::unifyDirSeparator(WCF_DIR.'images/'.$this->image)) continue; + if ($this->image2x && FileUtil::unifyDirSeparator($file->getPathname()) === FileUtil::unifyDirSeparator(WCF_DIR.'images/'.$this->image2x)) continue; + if ($coverPhoto && FileUtil::unifyDirSeparator($file->getPathname()) === FileUtil::unifyDirSeparator($coverPhoto)) continue; + $imagesTar->add($file->getPathName(), '', $this->getAssetPath()); } // append images tar to style tar