Proper backing up of Apache logs
[hcoop/domtool2.git] / src / slave.sml
index 7a507fa..3262b52 100644 (file)
@@ -209,17 +209,12 @@ fun removeDups ls = List.foldr (fn (x, ls) =>
                                   else
                                       x :: ls) [] ls
 
-fun copyDirCreate {from, to} =
-    (mkDirAll to;
-     if Posix.FileSys.access (from, []) then
-        ignore (OS.Process.system ("cp -r " ^ from ^ " " ^ to))
-     else
-        ())
-
 fun moveDirCreate {from, to} =
     (mkDirAll to;
      if Posix.FileSys.access (from, []) then
-        ignore (OS.Process.system ("mv " ^ from ^ " " ^ to))
+        (ignore (OS.Process.system ("rm -rf " ^ to));
+         ignore (OS.Process.system ("cp -r " ^ from ^ " " ^ to));
+         ignore (OS.Process.system ("rm -rf " ^ from)))
      else
         ())