mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Bug 1770: Files larger than 0.5 GB are never uploaded in ascii/text mode with SCP protocol as it would fail anyway due to memory issues
https://winscp.net/tracker/1770 Source commit: 5556d5c5dc139de1e67954f7466ad174ce5a11f3
This commit is contained in:
@@ -1757,7 +1757,15 @@ void __fastcall TSCPFileSystem::SCPSource(const UnicodeString FileName,
|
||||
OperationProgress->SetTransferSize(OperationProgress->LocalSize);
|
||||
OperationProgress->SetTransferringFile(false);
|
||||
|
||||
FTerminal->SelectSourceTransferMode(Handle, CopyParam);
|
||||
if (Handle.Size > 512*1024*1024)
|
||||
{
|
||||
OperationProgress->SetAsciiTransfer(false);
|
||||
FTerminal->LogEvent(FORMAT(L"Binary transfer mode selected as the file is too large (%s) to be uploaded in Ascii mode using SCP protocol.", (IntToStr(Handle.Size))));
|
||||
}
|
||||
else
|
||||
{
|
||||
FTerminal->SelectSourceTransferMode(Handle, CopyParam);
|
||||
}
|
||||
|
||||
TUploadSessionAction Action(FTerminal->ActionLog);
|
||||
Action.FileName(ExpandUNCFileName(FileName));
|
||||
|
||||
Reference in New Issue
Block a user