From e4bc95500cd09d807060f6b5c97d8be201471100 Mon Sep 17 00:00:00 2001 From: Yurin Slava Date: Wed, 30 May 2012 10:55:07 +0700 Subject: Fix #232 (rebar_reltool:mk_target_dir) --- src/rebar_reltool.erl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_reltool.erl b/src/rebar_reltool.erl index 42c7f15..7a925f6 100644 --- a/src/rebar_reltool.erl +++ b/src/rebar_reltool.erl @@ -223,7 +223,7 @@ run_reltool(Server, _Config, ReltoolConfig) -> mk_target_dir(TargetDir) -> - case file:make_dir(TargetDir) of + case filelib:ensure_dir(filename:join(TargetDir, "dummy")) of ok -> ok; {error, eexist} -> @@ -236,7 +236,11 @@ mk_target_dir(TargetDir) -> ?ERROR("Release target directory ~p already exists!\n", [TargetDir]), ?FAIL - end + end; + {error, Reason} -> + ?ERROR("Failed to make target dir ~p: ~s\n", + [TargetDir, file:format_error(Reason)]), + ?FAIL end. -- cgit v1.1