Browse Source

* LDV::Zerobin : fix prune()

master
Alex 'AdUser' Z 8 years ago
parent
commit
b5a751c176
  1. 2
      lib/LDV/Zerobin.pm

2
lib/LDV/Zerobin.pm

@ -167,7 +167,7 @@ sub prune {
next unless $file =~ m/^(\d+)\.json$/oi;
my $time = $1;
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}));
$self->app->log->info("Removing expired paste: $file ($date)");
unlink $self->_metadata_path($time);

Loading…
Cancel
Save