From f9c1a044ac09aeb01492779bc3fc5d72d8fefb6c Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Sat, 25 May 2013 12:49:07 +0100 Subject: [PATCH] Use rmtree instead of unlink: clang creates directories. Copied from Perforce Change: 182211 ServerID: perforce.ravenbrook.com --- mps/test/test/script/clib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mps/test/test/script/clib b/mps/test/test/script/clib index 0fc8b8d8a0a..be657870835 100644 --- a/mps/test/test/script/clib +++ b/mps/test/test/script/clib @@ -7,6 +7,8 @@ 1; +use File::Path qw(rmtree); + sub clib { my $success = 1; my $tlfile; @@ -50,7 +52,7 @@ sub objpurge { } &logcomment("Cleaning out old object files."); foreach (readdir(DIR)) { - unless ($_ eq "." || $_ eq ".." || unlink $obj_dir."/".$_) { + unless ($_ eq "." || $_ eq ".." || rmtree $obj_dir."/".$_) { &logcomment(" ... but failed to delete $_."); } }