From 4b4d339c29f5572dde29945221b48987126edfcd Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Mon, 20 Jul 2015 00:19:48 +1000 Subject: [PATCH] * fix LDV::Imgbin->view --- lib/LDV/Imgbin.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/LDV/Imgbin.pm b/lib/LDV/Imgbin.pm index 21d4513..a2eb76d 100644 --- a/lib/LDV/Imgbin.pm +++ b/lib/LDV/Imgbin.pm @@ -45,9 +45,8 @@ sub view { eval { my $path = $self->_data_path($time); my $data = Mojo::Asset::File->new(path => $path); - $data->cleanup(0); my $json = decode_json($data->slurp); - die("image expired\n") if (time() > $data->{expire}); + die("image expired\n") if (time() > $json->{expire}); $json->{path} = $self->_image_path($time, $json->{format}); $self->stash(image => $json); 1;