1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Bug 1949: Improve handling of long shell command error messages

https://winscp.net/tracker/1949

Source commit: e62368857b958d84c02e837a62ab7efe4ea63e1d
This commit is contained in:
Martin Prikryl
2021-02-02 15:19:13 +00:00
parent baa5e86864
commit eaa430fbe4
4 changed files with 14 additions and 3 deletions

View File

@@ -650,7 +650,14 @@ void __fastcall TSCPFileSystem::ReadCommandOutput(int Params, const UnicodeStrin
if (WrongOutput || WrongReturnCode)
{
DebugAssert(Cmd != NULL);
FTerminal->TerminalError(FMTLOAD(COMMAND_FAILED, (*Cmd, ReturnCode, Message)));
if (Message.IsEmpty())
{
FTerminal->TerminalError(FMTLOAD(COMMAND_FAILED_CODEONLY, (ReturnCode)));
}
else
{
throw ETerminal(MainInstructions(FMTLOAD(COMMAND_FAILED2, (*Cmd, ReturnCode))), Message);
}
}
}
}