diff options
author | Björn Gustavsson <[email protected]> | 2017-03-03 11:51:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-03 11:51:25 +0100 |
commit | 0438c6c2c5c4a447ab3a47a443968488a0d835eb (patch) | |
tree | 09ec3bd3f4a66ab2a9cdf3d1e468352763d4e228 /lib/observer | |
parent | 960b4e63c8fcfa8577ac877464e300959f20db12 (diff) | |
parent | 209985d1eca6389e363c4dc0dac7c91f9415de28 (diff) | |
download | otp-0438c6c2c5c4a447ab3a47a443968488a0d835eb.tar.gz otp-0438c6c2c5c4a447ab3a47a443968488a0d835eb.tar.bz2 otp-0438c6c2c5c4a447ab3a47a443968488a0d835eb.zip |
Merge pull request #1361 from bjorng/bjorn/home-directory/ERL-161/OTP-14249
Use a portable way to lookup the home directory
Diffstat (limited to 'lib/observer')
-rw-r--r-- | lib/observer/src/observer_wx.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl index 3031a1f90d..83de4fa64c 100644 --- a/lib/observer/src/observer_wx.erl +++ b/lib/observer/src/observer_wx.erl @@ -636,7 +636,8 @@ create_connect_dialog(connect, #state{frame = Frame}) -> wxWindow:setSizerAndFit(Dialog, VSizer), wxSizer:setSizeHints(VSizer, Dialog), - CookiePath = filename:join(os:getenv("HOME"), ".erlang.cookie"), + {ok,[[HomeDir]]} = init:get_argument(home), + CookiePath = filename:join(HomeDir, ".erlang.cookie"), DefaultCookie = case filelib:is_file(CookiePath) of true -> {ok, Bin} = file:read_file(CookiePath), |