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