From 708c190faad4f992601eca3d5a9d0b8000390d28 Mon Sep 17 00:00:00 2001 From: Juan Jose Comellas Date: Tue, 18 Jun 2013 18:03:30 -0300 Subject: Allow the use of absolute paths in the lib_dirs configuration setting --- src/rebar_core.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 3172d64..44e434d 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -412,7 +412,10 @@ expand_lib_dirs([], _Root, Acc) -> Acc; expand_lib_dirs([Dir | Rest], Root, Acc) -> Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])), - FqApps = [filename:join([Root, A]) || A <- Apps], + FqApps = case filename:pathtype(Dir) of + absolute -> Apps; + relative -> [filename:join([Root, A]) || A <- Apps] + end, expand_lib_dirs(Rest, Root, Acc ++ FqApps). -- cgit v1.1 From d4164c960655762a794f1bc2b0a08c7f8b939c3f Mon Sep 17 00:00:00 2001 From: Juan Jose Comellas Date: Tue, 18 Jun 2013 19:19:41 -0300 Subject: When expanding lib_dirs, don't crash with 'volumerelative' paths --- src/rebar_core.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 44e434d..61e8412 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -414,7 +414,7 @@ expand_lib_dirs([Dir | Rest], Root, Acc) -> Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])), FqApps = case filename:pathtype(Dir) of absolute -> Apps; - relative -> [filename:join([Root, A]) || A <- Apps] + _ -> [filename:join([Root, A]) || A <- Apps] end, expand_lib_dirs(Rest, Root, Acc ++ FqApps). -- cgit v1.1