From 1cb1ae238a2d497dcd72a544a540e70f401529f2 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 4 Sep 2011 22:53:39 +0200 Subject: Fix regression in rebar_file_utils:cp_r/2 --- src/rebar_file_utils.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.1