mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 04:35:22 +00:00
[CMD] Improve the way the ErrorMessage() helper and the MKDIR and RMDIR commands report their errors.
For MKDIR, also properly support the case of ERROR_FILE_EXISTS and ERROR_ALREADY_EXISTS last-errors by displaying the standard error "A subdirectory or file XXX already exists.\n"
This commit is contained in:
parent
1efbcd3d5d
commit
5830ccb85e
2 changed files with 16 additions and 7 deletions
|
@ -50,7 +50,7 @@ ErrorMessage(
|
|||
NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&szError, 0, NULL))
|
||||
{
|
||||
ConErrPrintf(_T("%s %s\n"), szError, szMessage);
|
||||
ConErrPrintf(_T("%s%s%s"), szError, szMessage, (*szMessage ? _T("\n") : _T("")));
|
||||
if (szError)
|
||||
LocalFree(szError);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue