From 2c1f91c4c2441cde00590f88efc5e0553783410f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 20 Jun 2023 23:51:10 +0100 Subject: [PATCH] mason/.perl-lib/TrivGal.pm (Image::scale): Factor out thumbnail path tail. --- mason/.perl-lib/TrivGal.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.11.0