Delete temp when updating
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2022-09-13 00:13:59 +02:00
parent 24c53106bd
commit eee6b86e15
2 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,8 @@ class JpgCompressor extends Compressor
$versionFilename = $this->media->versionsDirPath().'/'.$this->versionFilename($destWidth, $destHeight); $versionFilename = $this->media->versionsDirPath().'/'.$this->versionFilename($destWidth, $destHeight);
if ($update && Storage::exists($versionFilename)) { if ($update && Storage::exists($versionFilename)) {
Storage::delete($temp);
return; return;
} }

View File

@ -64,6 +64,8 @@ class PngCompressor extends Compressor
$versionFilename = $this->media->versionsDirPath().'/'.$this->versionFilename($destWidth, $destHeight); $versionFilename = $this->media->versionsDirPath().'/'.$this->versionFilename($destWidth, $destHeight);
if ($update && Storage::exists($versionFilename)) { if ($update && Storage::exists($versionFilename)) {
Storage::delete($temp);
return; return;
} }