From 6f40b80ee39075984b4a2216e70220e0f6b587cd Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 15 Jun 2010 14:37:00 -0600 Subject: [PATCH] Fixing http://hg.basho.com/rebar/issue/6; rebar_edoc was a little enthusiastic about deleting the doc dir --- src/rebar_edoc.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rebar_edoc.erl b/src/rebar_edoc.erl index ed7c226..cc8e69f 100644 --- a/src/rebar_edoc.erl +++ b/src/rebar_edoc.erl @@ -59,4 +59,8 @@ doc(Config, File) -> clean(Config, _File) -> EDocOpts = rebar_config:get(Config, edoc_opts, []), DocDir = proplists:get_value(dir, EDocOpts, "doc"), - rebar_file_utils:rm_rf(DocDir). + + %% Delete all files except overview.edoc + Files = [F || F <- rebar_utils:find_files(DocDir, ".*"), + filename:basename(F) /= "overview.edoc"], + rebar_file_utils:delete_each(Files).