[PATCH] testbot: Treat directories and files the same when using rmtree().
7 Mar
2018
7 Mar
'18
12:32 p.m.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- testbot/bin/Janitor.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index d8a9650f1..41f88d9e7 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -242,8 +242,7 @@ if (opendir(my $dh, "$DataDir/staging")) { if ($Age >= $JobPurgeDays + 7) { - if ((-d $FileName and !rmtree($FileName)) or - !unlink($FileName)) + if (!rmtree($FileName)) { LogMsg "Could not delete '$FileName': $!\n"; } -- 2.16.1
2836
Age (days ago)
2836
Last active (days ago)
0 comments
1 participants
participants (1)
-
Francois Gouget