aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2014-05-04 17:47:19 +0200
committerJordan Wilberding <[email protected]>2014-05-04 17:47:19 +0200
commit9e26ebba1d4568b8dfad4cd3c8c203a791b1fa45 (patch)
tree771af72c2eadae451922d00e0ae99c5151346d16 /src
parent5d61e6750560c42671065ed5092718c84e4c5f14 (diff)
parentec5ce1d9d5b88d6d18fd4cd90764e1cf57261dea (diff)
downloadrelx-9e26ebba1d4568b8dfad4cd3c8c203a791b1fa45.tar.gz
relx-9e26ebba1d4568b8dfad4cd3c8c203a791b1fa45.tar.bz2
relx-9e26ebba1d4568b8dfad4cd3c8c203a791b1fa45.zip
Merge pull request #170 from tsloughter/master
remove use of cwd to read symlink path
Diffstat (limited to 'src')
-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 ->