summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-11-27 18:48:55 +0100
committerTom Hacohen <tom@stosb.com>2015-11-30 11:27:33 +0000
commit0a44c3f78b0950d8363465bb0d487ea17ee043b7 (patch)
tree67e3eb62d2ff5ae73542abefbfda7b455ade6bba /src/lib/evil
parent0d1c1d5ad6e6e7f60512677bb80b74efb05973b6 (diff)
Evil: fix warning
Use the USERPROFILE environment variable instead of deprecated evil_homedir_get function. Also set the shell to cmd.exe if the SHELL var is not found
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_pwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evil/evil_pwd.c b/src/lib/evil/evil_pwd.c
index 5b323f48ab..f53b1d8810 100644
--- a/src/lib/evil/evil_pwd.c
+++ b/src/lib/evil/evil_pwd.c
@@ -57,10 +57,10 @@ getpwnam(const char *n)
57 pw.pw_name = user_name; 57 pw.pw_name = user_name;
58 snprintf(user_gecos, sizeof(user_gecos), "%s,,,", user_name); 58 snprintf(user_gecos, sizeof(user_gecos), "%s,,,", user_name);
59 pw.pw_gecos = user_gecos; 59 pw.pw_gecos = user_gecos;
60 pw.pw_dir = (char *)evil_homedir_get(); 60 pw.pw_dir = getenv("USERPROFILE");
61 pw.pw_shell = getenv("SHELL"); 61 pw.pw_shell = getenv("SHELL");
62 if (!pw.pw_shell) 62 if (!pw.pw_shell)
63 pw.pw_shell = "sh"; 63 pw.pw_shell = "cmd.exe";
64 64
65 return &pw; 65 return &pw;
66} 66}