]> mj.ucw.cz Git - moe.git/commitdiff
Isolate: Let "--cleanup" remove the whole box directory
authorMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 20:59:52 +0000 (22:59 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 20:59:52 +0000 (22:59 +0200)
isolate/isolate.c

index 20d9f9f5dd35714356f1b1f19406b117409a9c0c..33c50889a736f51771afd633bcee21ec16844a77 100644 (file)
@@ -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();
 }