Skip to content

Commit 9fbaa79

Browse files
author
Vlad Ionescu
committed
removing rabbit_misc:absolute_path
1 parent 4dc5390 commit 9fbaa79

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

src/rabbit.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ log_location(Type) ->
217217

218218
app_location() ->
219219
{ok, Application} = application:get_application(),
220-
rabbit_misc:absolute_path(
221-
code:where_is_file(atom_to_list(Application) ++ ".app")).
220+
filename:absname(code:where_is_file(atom_to_list(Application) ++ ".app")).
222221

223222
%---------------------------------------------------------------------------
224223

src/rabbit_misc.erl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
-export([format_stderr/2]).
5656
-export([start_applications/1, stop_applications/1]).
5757
-export([unfold/2, ceil/1]).
58-
-export([absolute_path/1]).
5958

6059
-import(mnesia).
6160
-import(lists).
@@ -125,7 +124,6 @@
125124
-spec(stop_applications/1 :: ([atom()]) -> 'ok').
126125
-spec(unfold/2 :: (fun ((A) -> ({'true', B, A} | 'false')), A) -> {[B], A}).
127126
-spec(ceil/1 :: (number()) -> number()).
128-
-spec(absolute_path/1 :: (string()) -> string()).
129127

130128
-endif.
131129

@@ -477,17 +475,3 @@ ceil(N) ->
477475
0 -> N;
478476
_ -> 1 + T
479477
end.
480-
481-
absolute_path(RelPath) ->
482-
filename:join(absolute_path([], filename:split(filename:absname(RelPath)))).
483-
484-
absolute_path([_ | ResultParts], [".." | Parts]) ->
485-
absolute_path(ResultParts, Parts);
486-
absolute_path([], [".." | Parts]) ->
487-
absolute_path([], Parts);
488-
absolute_path(ResultParts, ["." | Parts]) ->
489-
absolute_path(ResultParts, Parts);
490-
absolute_path(ResultParts, [Part | Parts]) ->
491-
absolute_path([Part | ResultParts], Parts);
492-
absolute_path(ResultParts, []) ->
493-
lists:reverse(ResultParts).

0 commit comments

Comments
 (0)