From bb99bca50055eaf253ece15409b381525f117c3d Mon Sep 17 00:00:00 2001 From: Ozzrell <63107640+Ozzrell@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:09:16 +0100 Subject: [PATCH] Update ImageStorage.php Fix delete() $onlyChangedImages not working. --- src/ImageStorage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ImageStorage.php b/src/ImageStorage.php index e34e851..5418b99 100644 --- a/src/ImageStorage.php +++ b/src/ImageStorage.php @@ -105,6 +105,8 @@ public function delete(mixed $arg, bool $onlyChangedImages = false): void } else { if (!$onlyChangedImages) { unlink(implode('/', [$this->orig_path, $script->namespace, $script->prefix, $origFile])); + } else { + array_map('unlink', glob(implode('/', [$this->orig_path, $script->namespace, $script->prefix, $script->name . '.*.' . $script->extension]))); } FileSystem::delete($dir);