Commit e5a26bc2 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd.exe: Support PUSHD with wildcards.

parent 121a8302
...@@ -600,9 +600,8 @@ void WCMD_goto (void) { ...@@ -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) { ...@@ -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;
......
...@@ -55,7 +55,7 @@ void WCMD_pipe (char *command); ...@@ -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);
......
...@@ -640,7 +640,7 @@ void WCMD_process_command (char *command) ...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment