Commit 3cd864bd authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

cmd: mkdir: Set errorlevel on invalid argument.

parent 15ce9a57
...@@ -537,6 +537,7 @@ void WCMD_create_dir (WCHAR *command) { ...@@ -537,6 +537,7 @@ void WCMD_create_dir (WCHAR *command) {
if (!argN) break; if (!argN) break;
if (!create_full_path(thisArg)) { if (!create_full_path(thisArg)) {
WCMD_print_error (); WCMD_print_error ();
errorlevel = 1;
} }
} }
} }
......
...@@ -485,18 +485,18 @@ if exist foo (rmdir foo & echo dir created ...@@ -485,18 +485,18 @@ if exist foo (rmdir foo & echo dir created
echo %ErrorLevel% echo %ErrorLevel%
rem Invalid chars rem Invalid chars
mkdir ? mkdir ?
echo %ErrorLevel% echo mkdir ? gives errorlevel %ErrorLevel%
call :setError 0 call :setError 0
mkdir ?\foo mkdir ?\foo
echo %ErrorLevel% echo mkdir ?\foo gives errorlevel %ErrorLevel%
call :setError 0 call :setError 0
mkdir foo\? mkdir foo\?
echo %ErrorLevel% echo mkdir foo\? gives errorlevel %ErrorLevel%
if exist foo (rmdir foo & echo ok, foo created if exist foo (rmdir foo & echo ok, foo created
) else ( echo foo not created ) ) else ( echo foo not created )
call :setError 0 call :setError 0
mkdir foo\bar\? mkdir foo\bar\?
echo %ErrorLevel% echo mkdir foo\bar\? gives errorlevel %ErrorLevel%
call :setError 0 call :setError 0
if not exist foo ( if not exist foo (
echo bad, foo not created echo bad, foo not created
......
...@@ -277,11 +277,11 @@ del /q * succeeded on file2.dat ...@@ -277,11 +277,11 @@ del /q * succeeded on file2.dat
0 0
dir created dir created
0 0
@todo_wine@1 mkdir ? gives errorlevel 1
@todo_wine@1 mkdir ?\foo gives errorlevel 1
@todo_wine@1 mkdir foo\? gives errorlevel 1
@todo_wine@ok, foo created @todo_wine@ok, foo created
@todo_wine@1 mkdir foo\bar\? gives errorlevel 1
@todo_wine@ok, foo\bar created @todo_wine@ok, foo\bar created
foo created foo created
bar created bar created
......
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