diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-08-09 16:15:10 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-08-09 16:15:10 +0200 |
commit | b5e0d6d5db19fef0b17e585354f75f57267df142 (patch) | |
tree | 20249ebe8fd588e603b28f8e8535c98ed10e57c3 | |
parent | 16091f99345ea97599a63be277f4d48f1b8ff2dc (diff) |
Fix rebar_core:restore_code_path (Reported-by: Siri Hansen)
Use erl_prim_loader:read_file_info instead of filelib:is_file to make
sure paths inside the escript archive are handled properly.
-rw-r--r-- | src/rebar_core.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index a150ef2..9e3f9f0 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -372,9 +372,11 @@ restore_code_path(no_change) -> restore_code_path({old, Path}) -> %% Verify that all of the paths still exist -- some dynamically %% added paths can get blown away during clean. - true = code:set_path([F || F <- Path, filelib:is_file(F)]), + true = code:set_path([F || F <- Path, erl_prim_loader_is_file(F)]), ok. +erl_prim_loader_is_file(File) -> + erl_prim_loader:read_file_info(File) =/= error. expand_lib_dirs([], _Root, Acc) -> Acc; |