mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 16:33:39 +00:00
cmd: mkdir: Handle multiple arguments.
This commit is contained in:
parent
62802b8bdf
commit
15ce9a5784
|
@ -523,13 +523,22 @@ static BOOL create_full_path(WCHAR* path)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void WCMD_create_dir (void) {
|
||||
void WCMD_create_dir (WCHAR *command) {
|
||||
int argno = 0;
|
||||
WCHAR *argN = command;
|
||||
|
||||
if (param1[0] == 0x00) {
|
||||
WCMD_output (WCMD_LoadMessage(WCMD_NOARG));
|
||||
return;
|
||||
}
|
||||
if (!create_full_path(param1)) WCMD_print_error ();
|
||||
/* Loop through all args */
|
||||
while (TRUE) {
|
||||
WCHAR *thisArg = WCMD_parameter(command, argno++, &argN);
|
||||
if (!argN) break;
|
||||
if (!create_full_path(thisArg)) {
|
||||
WCMD_print_error ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse the /A options given by the user on the commandline
|
||||
|
|
|
@ -284,9 +284,9 @@ dir created
|
|||
@todo_wine@1
|
||||
@todo_wine@ok, foo\bar created
|
||||
foo created
|
||||
@todo_wine@bar created
|
||||
@todo_wine@foobar created
|
||||
@todo_wine@bar\baz created
|
||||
bar created
|
||||
foobar created
|
||||
bar\baz created
|
||||
----------- Testing rmdir -----------
|
||||
0
|
||||
dir removed
|
||||
|
|
|
@ -56,7 +56,7 @@ void WCMD_choice (WCHAR *);
|
|||
void WCMD_clear_screen (void);
|
||||
void WCMD_color (void);
|
||||
void WCMD_copy (void);
|
||||
void WCMD_create_dir (void);
|
||||
void WCMD_create_dir (WCHAR *);
|
||||
BOOL WCMD_delete (WCHAR *);
|
||||
void WCMD_directory (WCHAR *);
|
||||
void WCMD_echo (const WCHAR *);
|
||||
|
|
|
@ -1472,7 +1472,7 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
|
|||
break;
|
||||
case WCMD_MD:
|
||||
case WCMD_MKDIR:
|
||||
WCMD_create_dir ();
|
||||
WCMD_create_dir (p);
|
||||
break;
|
||||
case WCMD_MOVE:
|
||||
WCMD_move ();
|
||||
|
|
Loading…
Reference in a new issue