mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 03:00:18 +00:00
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.
This commit is contained in:
parent
16091f9934
commit
b5e0d6d5db
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue