aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rlx_depsolver.erl4
-rw-r--r--src/rlx_dscv_util.erl7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/rlx_depsolver.erl b/src/rlx_depsolver.erl
index 20423d0..5d78174 100644
--- a/src/rlx_depsolver.erl
+++ b/src/rlx_depsolver.erl
@@ -112,7 +112,11 @@
%%============================================================================
%% type
%%============================================================================
+-ifdef(namespaced_types).
+-type dep_graph() :: gb_tree:tree().
+-else.
-type dep_graph() :: gb_tree().
+-endif.
-opaque t() :: {?MODULE, dep_graph()}.
-type pkg() :: {pkg_name(), vsn()}.
-type pkg_name() :: binary() | atom().
diff --git a/src/rlx_dscv_util.erl b/src/rlx_dscv_util.erl
index a4a265c..aa642b8 100644
--- a/src/rlx_dscv_util.erl
+++ b/src/rlx_dscv_util.erl
@@ -110,11 +110,8 @@ discover_dir(ProcessDir, File, symlink) ->
discover_real_symlink_dir(ProcessDir, File)
end.
-discover_real_symlink_dir(ProcessDir, File) ->
- {ok, CurCwd} = file:get_cwd(),
- ok = file:set_cwd(File),
- {ok, ActualRealDir} = file:get_cwd(),
- ok = file:set_cwd(CurCwd),
+discover_real_symlink_dir(ProcessDir, File) ->
+ {ok, ActualRealDir} = file:read_link(File),
case lists:prefix(iolist_to_list(filename:absname(ActualRealDir)),
iolist_to_list(filename:absname(File))) of
true ->