Forget set some error level and some msg that should have goto ConOut not to ConErr so pipe are working with thuse msg

svn path=/trunk/; revision=16579
This commit is contained in:
Magnus Olsen 2005-07-15 14:50:46 +00:00
parent bde6eea1e8
commit 97d546c77a
2 changed files with 7 additions and 2 deletions

View file

@ -349,13 +349,13 @@ VOID ConOutFormatMessage (DWORD MessageId, ...)
va_end (arg_ptr);
if(ret > 0)
{
ConErrPuts (text);
ConOutPuts (text);
LocalFree(text);
}
else
{
LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
ConErrPrintf(szMsg);
ConOutPrintf(szMsg);
}
}

View file

@ -146,6 +146,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, DWORD lpdwFlags)
{
CloseHandle (hFileSrc);
error_path_not_found ();
nErrorLevel = 1;
return 0;
}
buffer = (LPBYTE)malloc (BUFF_SIZE);
@ -154,6 +155,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, DWORD lpdwFlags)
CloseHandle (hFileDest);
CloseHandle (hFileSrc);
error_out_of_memory ();
nErrorLevel = 1;
return 0;
}
@ -434,6 +436,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
{
/* there is too many file names in command */
error_too_many_parameters("");
nErrorLevel = 1;
return 1;
}
@ -607,6 +610,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
{
ConOutFormatMessage (GetLastError(), szSrcPath);
freep (arg);
nErrorLevel = 1;
return 1;
}
@ -624,6 +628,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
{
ConOutFormatMessage (GetLastError (), szSrcPath);
freep (arg);
nErrorLevel = 1;
return 1;
}
/* Copy over the destination path name */