From 78e47bafa84acfcaaa94ed114038e5e1c440f2cd Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Mon, 6 Mar 2017 15:33:03 +0000 Subject: [PATCH] Don't save the db if _build doesn't exist --- src/build_system.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build_system.ml b/src/build_system.ml index ebc26c2d..7d227240 100644 --- a/src/build_system.ml +++ b/src/build_system.ml @@ -384,7 +384,8 @@ module Trace = struct |> List.map ~f:(fun (path, hash) -> Sexp.List [ Atom (Path.to_string path); Atom (Digest.to_hex hash) ])) in - write_file file (Sexp.to_string sexp) + if Sys.file_exists "_build" then + write_file file (Sexp.to_string sexp) let load () = let trace = Hashtbl.create 1024 in