1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
This commit is contained in:
Martin Prikryl
2013-08-12 09:54:06 +00:00
parent 43ec878d4b
commit 1abb25b42b
105 changed files with 3601 additions and 787 deletions

View File

@@ -691,10 +691,17 @@ void __fastcall TSCPFileSystem::DoStartup()
{
// SkipStartupMessage and DetectReturnVar must succeed,
// otherwise session is to be closed.
FTerminal->ExceptionOnFail = true;
SkipStartupMessage();
if (FTerminal->SessionData->DetectReturnVar) DetectReturnVar();
FTerminal->ExceptionOnFail = false;
try
{
FTerminal->ExceptionOnFail = true;
SkipStartupMessage();
if (FTerminal->SessionData->DetectReturnVar) DetectReturnVar();
FTerminal->ExceptionOnFail = false;
}
catch (Exception & E)
{
FTerminal->FatalError(&E, L"");
}
#define COND_OPER(OPER) if (FTerminal->SessionData->OPER) OPER()
COND_OPER(ClearAliases);
@@ -754,7 +761,7 @@ void __fastcall TSCPFileSystem::DetectReturnVar()
if ((Output->Count != 1) || (StrToIntDef(Output->Strings[0], 256) > 255))
{
FTerminal->LogEvent(L"The response is not numerical exit code");
Abort();
EXCEPTION;
}
}
catch (EFatal &E)
@@ -777,7 +784,7 @@ void __fastcall TSCPFileSystem::DetectReturnVar()
if (NewReturnVar.IsEmpty())
{
Abort();
EXCEPTION;
}
else
{