Fixed handling of PATH command with spaces.

This commit is contained in:
Sylvain Petreolle 2003-02-11 22:01:11 +00:00 committed by Alexandre Julliard
parent 095322e271
commit fdd0bfa13c
3 changed files with 4 additions and 7 deletions

View File

@ -672,7 +672,7 @@ char buffer[1048];
* Set/Show the path environment variable * Set/Show the path environment variable
*/ */
void WCMD_setshow_path () { void WCMD_setshow_path (char *command) {
char string[1024]; char string[1024];
DWORD status; DWORD status;
@ -687,7 +687,7 @@ DWORD status;
} }
} }
else { else {
status = SetEnvironmentVariable ("PATH", param1); status = SetEnvironmentVariable ("PATH", command);
if (!status) WCMD_print_error(); if (!status) WCMD_print_error();
} }
} }

View File

@ -60,7 +60,7 @@ void WCMD_setshow_attrib (void);
void WCMD_setshow_date (void); void WCMD_setshow_date (void);
void WCMD_setshow_default (void); void WCMD_setshow_default (void);
void WCMD_setshow_env (char *command); void WCMD_setshow_env (char *command);
void WCMD_setshow_path (void); void WCMD_setshow_path (char *command);
void WCMD_setshow_prompt (void); void WCMD_setshow_prompt (void);
void WCMD_setshow_time (void); void WCMD_setshow_time (void);
void WCMD_shift (void); void WCMD_shift (void);
@ -135,6 +135,3 @@ typedef struct {
/* Must be last in list */ /* Must be last in list */
#define WCMD_EXIT 36 #define WCMD_EXIT 36

View File

@ -286,7 +286,7 @@ char *whichcmd;
WCMD_move (); WCMD_move ();
break; break;
case WCMD_PATH: case WCMD_PATH:
WCMD_setshow_path (); WCMD_setshow_path (p);
break; break;
case WCMD_PAUSE: case WCMD_PAUSE:
WCMD_pause (); WCMD_pause ();