|
|
@ -167,7 +167,7 @@ sub prune { |
|
|
|
next unless $file =~ m/^(\d+)\.json$/oi; |
|
|
|
next unless $file =~ m/^(\d+)\.json$/oi; |
|
|
|
my $time = $1; |
|
|
|
my $time = $1; |
|
|
|
my $data = $self->_metadata_load($time); |
|
|
|
my $data = $self->_metadata_load($time); |
|
|
|
next if $data->{expire} > $time; # not yet |
|
|
|
next if $data->{expire} > $currtime; # not yet |
|
|
|
my $date = strftime("%Y-%m-%d %H:%M", localtime($data->{expire})); |
|
|
|
my $date = strftime("%Y-%m-%d %H:%M", localtime($data->{expire})); |
|
|
|
$self->app->log->info("Removing expired paste: $file ($date)"); |
|
|
|
$self->app->log->info("Removing expired paste: $file ($date)"); |
|
|
|
unlink $self->_metadata_path($time); |
|
|
|
unlink $self->_metadata_path($time); |
|
|
|