From 38f068341ebf04e5d6bf5eff7fb01e44bce228b6 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 22 Mar 2012 16:39:20 +0100 Subject: [reltool] Allow lib_dir on app level to use relative path This commit adds a normalization of the directory given with the lib_dir parameter on application level. This will covert the path to absolute, remove trailing slash and any occurrencies of "xxx/..". --- lib/reltool/src/reltool_server.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/reltool/src/reltool_server.erl') diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl index 084174a02a..034a42e1e2 100644 --- a/lib/reltool/src/reltool_server.erl +++ b/lib/reltool/src/reltool_server.erl @@ -1498,9 +1498,10 @@ decode(#app{} = App, [{Key, Val} | KeyVals]) -> lib_dir when is_list(Val), App#app.use_selected_vsn=:=undefined -> case filelib:is_dir(Val) of true -> + Dir = reltool_utils:normalize_dir(Val), App#app{use_selected_vsn = dir, - active_dir = Val, - sorted_dirs = [Val]}; + active_dir = Dir, + sorted_dirs = [Dir]}; false -> reltool_utils:throw_error("Illegal lib dir for ~p: ~p", [App#app.name, Val]) -- cgit v1.2.3