cmd.exe: Support PUSHD with wildcards.

This commit is contained in:
Jason Edmeades 2007-03-08 00:44:09 +00:00 committed by Alexandre Julliard
parent 121a830219
commit e5a26bc24d
3 changed files with 6 additions and 7 deletions

View File

@ -600,9 +600,8 @@ void WCMD_goto (void) {
* Push a directory onto the stack * Push a directory onto the stack
*/ */
void WCMD_pushd (void) { void WCMD_pushd (char *command) {
struct env_stack *curdir; struct env_stack *curdir;
BOOL status;
WCHAR *thisdir; WCHAR *thisdir;
curdir = LocalAlloc (LMEM_FIXED, sizeof (struct env_stack)); curdir = LocalAlloc (LMEM_FIXED, sizeof (struct env_stack));
@ -615,9 +614,9 @@ void WCMD_pushd (void) {
} }
GetCurrentDirectoryW (1024, thisdir); GetCurrentDirectoryW (1024, thisdir);
status = SetCurrentDirectoryA (param1); errorlevel = 0;
if (!status) { WCMD_setshow_default(command);
WCMD_print_error (); if (errorlevel) {
LocalFree(curdir); LocalFree(curdir);
LocalFree(thisdir); LocalFree(thisdir);
return; return;

View File

@ -55,7 +55,7 @@ void WCMD_pipe (char *command);
void WCMD_popd (void); void WCMD_popd (void);
void WCMD_print_error (void); void WCMD_print_error (void);
void WCMD_process_command (char *command); void WCMD_process_command (char *command);
void WCMD_pushd (void); void WCMD_pushd (char *);
int WCMD_read_console (char *string, int str_len); int WCMD_read_console (char *string, int str_len);
void WCMD_remove_dir (char *command); void WCMD_remove_dir (char *command);
void WCMD_rename (void); void WCMD_rename (void);

View File

@ -640,7 +640,7 @@ void WCMD_process_command (char *command)
WCMD_volume (0, p); WCMD_volume (0, p);
break; break;
case WCMD_PUSHD: case WCMD_PUSHD:
WCMD_pushd(); WCMD_pushd(p);
break; break;
case WCMD_POPD: case WCMD_POPD:
WCMD_popd(); WCMD_popd();