Commits

camlspotter  committed c600aa9

fixed stupid _build dir handling

  • Participants
  • Parent commits 99da3bf

Comments (0)

Files changed (1)

 
 let comp_dir fp0 =
   assert (FP.is_absolute fp0);
-
-  let rec f rev_bases fp = 
+  let rec f bases fp = 
     let dir = FP.to_string fp in
     let ocamlbuild_path = dir ^/ "_build" in
     let diropt = 
       else None
     in
     match diropt with
-    | Some _ -> Some (FP.(^/) fp (Filename.concats ("_build" :: List.rev rev_bases)))
+    | Some _ -> Some (FP.(^/) fp (Filename.concats ("_build" :: bases)))
     | None ->
         if FP.is_root fp then Some fp0
         else match FP.dirbase fp with
-        | dir, Some base -> f (base :: rev_bases) dir
+        | dir, Some base -> f (base :: bases) dir
         | _ -> assert false
   in
   Option.default (f [] fp0) (fun () -> fp0)