Module: tools Branch: master Commit: b63d7a92059708d207848674ffb6d72367cd4a36 URL: https://source.winehq.org/git/tools.git/?a=commit;h=b63d7a92059708d207848674...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Apr 13 12:24:06 2021 +0200
testbot/Janitor: Round the file age down when purging.
There is not much point in rounding to nearest and rounding down is simpler.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/Janitor.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index 35a7e5d..c68920e 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -269,7 +269,7 @@ if (opendir(my $dh, "$DataDir/staging"))
$Entry =~ m%^([^/]+)$%; # untaint my $FileName = "$DataDir/staging/$1"; - my $Age = int((-M $FileName) + 0.5); + my $Age = int(-M $FileName); my $TTL = $JobPurgeDays ? $JobPurgeDays - $Age : undef;
# FIXME: There are still some obsolete unexpired 31 characters session ids. @@ -326,7 +326,7 @@ if (opendir(my $dh, "$DataDir/latest"))
$Entry =~ m%^([^/]+)$%; # untaint my $FileName = "$DataDir/latest/$1"; - my $Age = int((-M $FileName) + 0.5); + my $Age = int(-M $FileName); my $TTL = $JobPurgeDays ? $JobPurgeDays - $Age : undef;
# Keep the regexp in sync with WineTestBot::Task::GetRefReportName()