diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index d059fe2773..083e98e797 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -506,7 +506,7 @@ get_shell(void) * for). */ const char* defaultshell = (IsWinNT() - ? "cmd.exe /x/c" : "command.com /c"); + ? "cmd.exe /x/d/c" : "command.com /c"); const char *usershell = PerlEnv_getenv("PERL5SHELL"); w32_perlshell_items = tokenize(usershell ? usershell : defaultshell, &w32_perlshell_tokens, @@ -3608,7 +3608,9 @@ create_command_line(char *cname, STRLEN clen, const char * const *args) if (!extra_quotes && cmd_shell - && (stricmp(arg, "/x/c") == 0 || stricmp(arg, "/c") == 0)) + && curlen >= 2 + && *arg == '/' /* see if arg is "/c", "/x/c", "/x/d/c" etc. */ + && stricmp(arg+curlen-2, "/c") == 0) { /* is there a next argument? */ if (args[index+1]) { |