]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: make cleardir() erase dot files too
authorDaniel Stenberg <daniel@haxx.se>
Fri, 21 Aug 2020 14:35:50 +0000 (16:35 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 23 Aug 2020 15:45:41 +0000 (17:45 +0200)
Because test cases might use dot files.

Closes #5838

tests/runtests.pl

index 1c40d31b0d3a8630a7cd89f7b358969efa6dc53c..b0bddba1c86032ef5f38096580a15f8a2fd586ac 100755 (executable)
@@ -2716,7 +2716,7 @@ sub cleardir {
     opendir(DIR, $dir) ||
         return 0; # can't open dir
     while($file = readdir(DIR)) {
-        if(($file !~ /^\./)) {
+        if(($file !~ /^\.(|\.)$/)) {
             unlink("$dir/$file");
             $count++;
         }