Evil: fix warning
authorVincent Torri <vincent dot torri at gmail dot com>
Fri, 27 Nov 2015 17:48:55 +0000 (18:48 +0100)
committerTom Hacohen <tom@stosb.com>
Mon, 30 Nov 2015 11:27:33 +0000 (11:27 +0000)
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

index 5b323f4..f53b1d8 100644 (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;
 }