X-Git-Url: http://git.ieval.ro/?p=nethack-naodash.git;a=blobdiff_plain;f=lib%2FNetHack%2FNAOdash.pm;h=c9e376f28c1bd3f45de0296bb74f04b5cd8eaed2;hp=92f17ef6d2a79e408b845dd80d15ec031d14f132;hb=3b893b63494905975c33aa6365d1914ea7fe03dc;hpb=42f966d60ef1754a7363522d04bff5d0f7919113 diff --git a/lib/NetHack/NAOdash.pm b/lib/NetHack/NAOdash.pm index 92f17ef..c9e376f 100644 --- a/lib/NetHack/NAOdash.pm +++ b/lib/NetHack/NAOdash.pm @@ -126,7 +126,7 @@ sub _get_xlog { my $dir = $ENV{NAODASH_CACHE} || catdir tmpdir, 'naodash'; mkdir $dir or die "Cannot create cache directory: $!\n" unless -d $dir; my $file = catfile $dir, $name; - write_file $file, _get_xlog_from_server $name unless -f $file && time - (stat $file)[9] < 86400; + write_file $file, _get_xlog_from_server $name if ! -f $file || time - (stat $file)[9] >= 86_400; scalar read_file $file }