summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2011-09-04 22:53:39 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-09-04 23:04:55 +0200
commit1cb1ae238a2d497dcd72a544a540e70f401529f2 (patch)
tree0e52143f76e969376fa9e1815559bc3920110f44
parent6f3f234d349af7ec915263d2f9ace04940ddc5c3 (diff)
Fix regression in rebar_file_utils:cp_r/2
-rw-r--r--src/rebar_file_utils.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl
index aef1c49..d026395 100644
--- a/src/rebar_file_utils.erl
+++ b/src/rebar_file_utils.erl
@@ -61,8 +61,9 @@ rm_rf(Target) ->
cp_r(Sources, Dest) ->
case os:type() of
{unix, _} ->
- SourceStr = string:join(Sources, " "),
- {ok, []} = rebar_utils:sh(?FMT("cp -R \"~s\" \"~s\"",
+ QuotedSources = ["\"" ++ Src ++ "\"" || Src <- Sources],
+ SourceStr = string:join(QuotedSources, " "),
+ {ok, []} = rebar_utils:sh(?FMT("cp -R ~s \"~s\"",
[SourceStr, Dest]),
[{use_stdout, false}, return_on_error]),
ok;