From 8353ef3dbefcd69c4b781ea87a110187782c3c15 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Thu, 28 Feb 2008 19:45:47 +0000 Subject: [PATCH] rm is reflected from the backend to the frontend again. --- backend.ml | 2 +- frontend.ml | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend.ml b/backend.ml index 690f1c6..153e8ac 100644 --- a/backend.ml +++ b/backend.ml @@ -139,7 +139,7 @@ class backendHandler dir_root (frontend_lst: frontendHandler list) = frontend#rmdir (mk_rel_path fqp)) slice_list end else List.iter (fun frontend -> - frontend#unlink (mk_rel_path fqp)) slice_list + fprintf logfd "Unlinking %s\n" fqp;flush Pervasives.stdout;frontend#unlink (mk_rel_path fqp)) slice_list end end else (* regex not matched *) diff --git a/frontend.ml b/frontend.ml index 3946736..ab4f176 100644 --- a/frontend.ml +++ b/frontend.ml @@ -54,11 +54,13 @@ object(this) (** *) method unlink rp = match rp with Relpath(rel) -> - let fqp1 = String.concat "/" [root_dir;rel;".in"] in - let fqp2 = String.concat "/" [root_dir;rel;".out"] in + let fqp1 = String.concat "/" [root_dir;rel] in + let fqp_in = String.concat "." [fqp1;"in"] in + let fqp2 = String.concat "/" [root_dir;rel] in + let fqp_out = String.concat "." [fqp2;"out"] in try - Unix.unlink fqp1; - Unix.unlink fqp2 + Unix.unlink fqp_in; + Unix.unlink fqp_out with _ -> fprintf logfd "Hm. %s disappeared. Looks like slice %s shot itself in the foot\n" fqp1 (this#get_slice_name ());flush logfd -- 2.47.0