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
This commit is contained in:
Vincent Torri 2015-11-27 18:48:55 +01:00 committed by Tom Hacohen
parent 0d1c1d5ad6
commit 0a44c3f78b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}