From: Martin Mares Date: Sat, 21 Apr 2012 20:59:52 +0000 (+0200) Subject: Isolate: Let "--cleanup" remove the whole box directory X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=21ac8a1a679c94b7a7490a6ce34ed062149b9783;p=eval.git Isolate: Let "--cleanup" remove the whole box directory --- diff --git a/isolate/isolate.c b/isolate/isolate.c index 20d9f9f..33c5088 100644 --- a/isolate/isolate.c +++ b/isolate/isolate.c @@ -1090,7 +1090,9 @@ cleanup(void) die("Box directory not found, there isn't anything to clean up"); msg("Deleting sandbox directory\n"); - xsystem("rm -rf box"); + xsystem("rm -rf *"); + if (rmdir(box_dir) < 0) + die("Cannot remove %s: %m", box_dir); cg_remove(); }