aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/msdos.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 154ee1501c5..fd9ae23efee 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -527,11 +527,20 @@ run_msdos_command (argv, dir, tempin, tempout)
527 if (msshell) 527 if (msshell)
528 { 528 {
529 saveargv1 = argv[1]; 529 saveargv1 = argv[1];
530 saveargv2 = argv[2];
530 argv[1] = "/c"; 531 argv[1] = "/c";
531 if (argv[2]) 532 if (argv[2])
532 { 533 {
533 saveargv2 = argv[2]; 534 char *p = alloca (strlen (argv[2]) + 1);
534 unixtodos_filename (argv[2] = strdup (argv[2])); 535
536 strcpy (argv[2] = p, saveargv2);
537 while (*p && isspace (*p))
538 p++;
539 while (*p && !isspace (*p))
540 if (*p == '/')
541 *p++ = '\\';
542 else
543 p++;
535 } 544 }
536 } 545 }
537 546
@@ -578,11 +587,7 @@ run_msdos_command (argv, dir, tempin, tempout)
578 if (msshell) 587 if (msshell)
579 { 588 {
580 argv[1] = saveargv1; 589 argv[1] = saveargv1;
581 if (argv[2]) 590 argv[2] = saveargv2;
582 {
583 free (argv[2]);
584 argv[2] = saveargv2;
585 }
586 } 591 }
587 return result; 592 return result;
588} 593}