diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2003-06-02 20:40:19 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2003-06-02 20:40:19 +0000 |
commit | 11998fdb9e856e363920dd01b47ba3f3fe2d0bb2 (patch) | |
tree | 048392dafaf52f38cdcd0984bd54b669dc163b8d /win32/win32.c | |
parent | 3a8ae1affddf8a9aac8746965f2ae13c7af42aba (diff) | |
download | perl-11998fdb9e856e363920dd01b47ba3f3fe2d0bb2.tar.gz |
resurrect change#19628 and make it work by generalizing
a spot that had a hardcoded dependency on the cmd.exe
arguments being "/x/c" or "/c"
p4raw-link: @19628 on //depot/perl: 7b24c8f3b02202da900623391393234a869d1b34
p4raw-id: //depot/perl@19668
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]) { |