Browse Source

Enforcing binary transfer mode, when ascii is not supported (particularly when encrypting files)

Source commit: 88ff34c5891aa5e0f2ce5e773ffa2a4f46f13d7f
Martin Prikryl 7 years ago
parent
commit
020fb1aaab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      source/core/Terminal.cpp

+ 2 - 1
source/core/Terminal.cpp

@@ -6885,7 +6885,8 @@ void __fastcall TTerminal::SelectTransferMode(
   const UnicodeString & BaseFileName, TOperationSide Side, const TCopyParamType * CopyParam,
   const TFileMasks::TParams & MaskParams)
 {
-  OperationProgress->SetAsciiTransfer(CopyParam->UseAsciiTransfer(BaseFileName, Side, MaskParams));
+  bool AsciiTransfer = IsCapable[fcTextMode] && CopyParam->UseAsciiTransfer(BaseFileName, Side, MaskParams);
+  OperationProgress->SetAsciiTransfer(AsciiTransfer);
   if (Configuration->ActualLogProtocol >= 0)
   {
     UnicodeString ModeName = (OperationProgress->AsciiTransfer ? L"Ascii" : L"Binary");