From: jcarsey Date: Wed, 15 Jun 2011 22:25:14 +0000 (+0000) Subject: restore original information when redirection fails inside a command using the split... X-Git-Tag: edk2-stable201903~14676 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a9ca068447cf9151eb65389bfc60cbc89fc78aa0;ds=sidebyside restore original information when redirection fails inside a command using the split operator (|). Signed-off-by: jcarsey Reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11831 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c index 5d2792ba30..99a7294842 100644 --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c @@ -886,6 +886,9 @@ UpdateStdInStdOutStdErr( ||(StdErrFileName != NULL && !ErrUnicode && ErrAppend && (!EFI_ERROR(ShellFileExists(StdErrFileName)) && !EFI_ERROR(IsUnicodeFile(StdErrFileName)))) ){ Status = EFI_INVALID_PARAMETER; + ShellParameters->StdIn = *OldStdIn; + ShellParameters->StdOut = *OldStdOut; + ShellParameters->StdErr = *OldStdErr; } else if (!EFI_ERROR(Status)){ // // Open the Std and we should not have conflicts here...