summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYurin Slava <YurinVV@ya.ru>2012-05-30 10:55:07 +0700
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-01 11:38:23 +0200
commite4bc95500cd09d807060f6b5c97d8be201471100 (patch)
tree75a365c4f907162fd71fe20d9dcf5b5b57ce6f36 /src
parent15d1c275f88ff623ee9dd7665ffb0b3e2c030981 (diff)
Fix #232 (rebar_reltool:mk_target_dir)
Diffstat (limited to 'src')
-rw-r--r--src/rebar_reltool.erl8
1 files changed, 6 insertions, 2 deletions
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.