From 0a44c3f78b0950d8363465bb0d487ea17ee043b7 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 27 Nov 2015 18:48:55 +0100 Subject: [PATCH] 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 --- src/lib/evil/evil_pwd.c | 4 ++-- 1 file 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) pw.pw_name = user_name; snprintf(user_gecos, sizeof(user_gecos), "%s,,,", user_name); pw.pw_gecos = user_gecos; - pw.pw_dir = (char *)evil_homedir_get(); + pw.pw_dir = getenv("USERPROFILE"); pw.pw_shell = getenv("SHELL"); if (!pw.pw_shell) - pw.pw_shell = "sh"; + pw.pw_shell = "cmd.exe"; return &pw; }