From: Mark Wooding Date: Tue, 20 Jun 2023 22:51:10 +0000 (+0100) Subject: mason/.perl-lib/TrivGal.pm (Image::scale): Factor out thumbnail path tail. X-Git-Url: https://git.distorted.org.uk/~mdw/tgal/commitdiff_plain/2c1f91c4c2441cde00590f88efc5e0553783410f mason/.perl-lib/TrivGal.pm (Image::scale): Factor out thumbnail path tail. --- diff --git a/mason/.perl-lib/TrivGal.pm b/mason/.perl-lib/TrivGal.pm index 513a682..594b383 100644 --- a/mason/.perl-lib/TrivGal.pm +++ b/mason/.perl-lib/TrivGal.pm @@ -243,9 +243,9 @@ package TrivGal::Image { if ($me->sz <= $sz) { return $m->interp->apply_escapes("$IMGURL/$path", "u"); } - my $thumb = "$CACHE/scale.$sz/$path"; - my $thumburl = - $m->interp->apply_escapes("$CACHEURL/scale.$sz/$path", "u"); + my $tail = "scale.$sz/$path"; + my $thumb = "$CACHE/$tail"; + my $thumburl = $m->interp->apply_escapes("$CACHEURL/$tail", "u"); my $st = stat $thumb; if (defined $st && $st->mtime > $me->{mtime}) { return $thumburl; } return