aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_dscv_util.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlx_dscv_util.erl')
-rw-r--r--src/rlx_dscv_util.erl7
1 files changed, 2 insertions, 5 deletions
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 ->