diff options
author | Benedikt Reinartz <filmor@gmail.com> | 2017-05-17 10:47:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 10:47:46 +0200 |
commit | 47db2e91fce39da12ec91742b41d80f142b30a4b (patch) | |
tree | 767e15fedf0ec00272b3daa447334b898353f808 | |
parent | 917abc61d4c4f9e1f84d15867ec2c8352b74067f (diff) |
Use rm_rf instead of ec_file:delete.
In contrast to `ec_file:delete`, `rebar_file_utils:rm_rf` will also delete
write-protected files on Windows which is needed for git object files.
Fixes #1483.
-rw-r--r-- | src/rebar_fetch.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl index 47bfe1d..f5e5db5 100644 --- a/src/rebar_fetch.erl +++ b/src/rebar_fetch.erl @@ -46,7 +46,7 @@ download_source_(AppDir, Source, State) -> {ok, _} -> ec_file:mkdir_p(AppDir1), code:del_path(filename:absname(filename:join(AppDir1, "ebin"))), - ec_file:remove(filename:absname(AppDir1), [recursive]), + ok = rebar_file_utils:rm_rf(filename:absname(AppDir1)), ?DEBUG("Moving checkout ~p to ~p", [TmpDir, filename:absname(AppDir1)]), ok = rebar_file_utils:mv(TmpDir, filename:absname(AppDir1)), true; |