summaryrefslogtreecommitdiff
path: root/src/rebar_prv_compile.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_compile.erl')
-rw-r--r--src/rebar_prv_compile.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 001ea68..0c6f40b 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -123,8 +123,12 @@ copy_app_dirs(AppName, OldAppDir, AppDir) ->
end,
filelib:ensure_dir(filename:join(AppDir, "dummy")),
%% link to src to be adjacent to ebin is needed for R15 use of cover/xref
- [file:make_symlink(filename:join(OldAppDir, Dir), filename:join(AppDir, Dir))
- || Dir <- ["priv", "include", "src"]];
+ [symlink_or_copy(OldAppDir, AppDir, Dir) || Dir <- ["priv", "include", "src"]];
false ->
ok
end.
+
+symlink_or_copy(OldAppDir, AppDir, Dir) ->
+ Source = filename:join(OldAppDir, Dir),
+ Target = filename:join(AppDir, Dir),
+ rebar_file_utils:symlink_or_copy(Source, Target).