Francois Gouget : testbot: Treat directories and files the same when using rmtree().

Alexandre Julliard julliard at winehq.org
Wed Mar 7 15:05:41 CST 2018


Module: tools
Branch: master
Commit: 19586b07b6dbe9207faf680261e3c92713126b45
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=19586b07b6dbe9207faf680261e3c92713126b45

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Mar  7 13:32:12 2018 +0100

testbot: Treat directories and files the same when using rmtree().

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 d8a9650..41f88d9 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";
           }




More information about the wine-cvs mailing list