mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
More meaningful error message when credentials are missing in scripting and .NET assembly
Source commit: a374ebe71eea553a366120f46b8d3169ad735a7a
This commit is contained in:
@@ -353,8 +353,7 @@ void __fastcall TS3FileSystem::Open()
|
||||
if (!FTerminal->PromptUser(Data, pkUserName, LoadStr(S3_ACCESS_KEY_ID_TITLE), L"",
|
||||
LoadStr(S3_ACCESS_KEY_ID_PROMPT), true, 0, AccessKeyId))
|
||||
{
|
||||
// note that we never get here actually
|
||||
throw Exception(L"");
|
||||
FTerminal->FatalError(NULL, LoadStr(CREDENTIALS_NOT_SPECIFIED));
|
||||
}
|
||||
}
|
||||
FAccessKeyId = UTF8String(AccessKeyId);
|
||||
@@ -379,8 +378,7 @@ void __fastcall TS3FileSystem::Open()
|
||||
if (!FTerminal->PromptUser(Data, pkPassword, LoadStr(S3_SECRET_ACCESS_KEY_TITLE), L"",
|
||||
LoadStr(S3_SECRET_ACCESS_KEY_PROMPT), false, 0, SecretAccessKey))
|
||||
{
|
||||
// note that we never get here actually
|
||||
throw Exception(L"");
|
||||
FTerminal->FatalError(NULL, LoadStr(CREDENTIALS_NOT_SPECIFIED));
|
||||
}
|
||||
}
|
||||
FSecretAccessKey = UTF8String(SecretAccessKey);
|
||||
|
||||
Reference in New Issue
Block a user