Fixing http://hg.basho.com/rebar/issue/6; rebar_edoc was a little enthusiastic about deleting the doc dir

This commit is contained in:
Dave Smith 2010-06-15 14:37:00 -06:00
parent 4a12b13939
commit 6f40b80ee3

View file

@ -59,4 +59,8 @@ doc(Config, File) ->
clean(Config, _File) -> clean(Config, _File) ->
EDocOpts = rebar_config:get(Config, edoc_opts, []), EDocOpts = rebar_config:get(Config, edoc_opts, []),
DocDir = proplists:get_value(dir, EDocOpts, "doc"), 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).