Francois Gouget : testbot/Janitor: Round the file age down when purging.
Alexandre Julliard
julliard at winehq.org
Tue Apr 13 15:59:04 CDT 2021
Module: tools
Branch: master
Commit: b63d7a92059708d207848674ffb6d72367cd4a36
URL: https://source.winehq.org/git/tools.git/?a=commit;h=b63d7a92059708d207848674ffb6d72367cd4a36
Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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()
More information about the wine-cvs
mailing list