Description
When performing a move to an open file, you get an error message, but %errorlevel% is still 0
you can try it out by
- start cmd.exe
- copy cmd.exe test.exe
- move /Y test.exe cmd.exe
you get errormessage with : ...\test.exe => ...\cmd.exe [Error] - echo %errorlevel% states 0 instead of 1
to fix it:
edit move.c, changes lines 498 - 501 (from github 2c66af on Oct 3, 2017 )
if (MoveStatus) |
ConOutResPrintf(STRING_MOVE_ERROR1);
|
else |
ConOutResPrintf(STRING_MOVE_ERROR2);
|
to
if (MoveStatus) |
ConOutResPrintf(STRING_MOVE_ERROR1);
|
else { |
ConOutResPrintf(STRING_MOVE_ERROR2);
|
nErrorLevel=1; |
}
|
Hans
Attachments
Issue Links
- blocks
-
CORE-8002 METABUG - cmd.exe Command-line interpreter bugs
- Open