aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/connect/ei_connect.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-06-21 18:32:16 +0200
committerSverker Eriksson <[email protected]>2016-06-21 18:32:16 +0200
commitdde235711d95ee9949d1df4a5f6c142493ee3a55 (patch)
tree00e9f6344ebdd818eb5efd3b2b2b5fa9e1796184 /lib/erl_interface/src/connect/ei_connect.c
parent093062c4c5b6a9374070f6a0f2c97dcdfcbc3d53 (diff)
downloadotp-dde235711d95ee9949d1df4a5f6c142493ee3a55.tar.gz
otp-dde235711d95ee9949d1df4a5f6c142493ee3a55.tar.bz2
otp-dde235711d95ee9949d1df4a5f6c142493ee3a55.zip
erl_interface: Look for .erlang.cookie in windows directory
the same as erlexec do to set -home command argument which is used to look for .erlang.cookie.
Diffstat (limited to 'lib/erl_interface/src/connect/ei_connect.c')
-rw-r--r--lib/erl_interface/src/connect/ei_connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c
index 36fe65e607..624100ad49 100644
--- a/lib/erl_interface/src/connect/ei_connect.c
+++ b/lib/erl_interface/src/connect/ei_connect.c
@@ -1719,6 +1719,12 @@ static int get_home(char *buf, int size)
strcat(buf, homepath);
return 1;
}
+ else {
+ int len = GetWindowsDirectory(buf, size);
+ if (len) {
+ return (len < size);
+ }
+ }
#else
char* homepath = getenv("HOME");
if (homepath) {