]> mj.ucw.cz Git - moe.git/blobdiff - isolate/isolate.c
Isolate: Let "--cleanup" remove the whole box directory
[moe.git] / 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();
 }