|
@@ -658,17 +658,21 @@ void __fastcall TSCPFileSystem::ReadCommandOutput(int Params, const UnicodeStrin
|
|
|
}
|
|
|
}
|
|
|
//---------------------------------------------------------------------------
|
|
|
-void __fastcall TSCPFileSystem::ExecCommand(const UnicodeString & Cmd, int Params,
|
|
|
- const UnicodeString & CmdString)
|
|
|
+void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
|
|
|
{
|
|
|
- if (Params < 0)
|
|
|
- {
|
|
|
- Params = ecDefault;
|
|
|
- }
|
|
|
+ FTerminal->TerminalError(FMTLOAD(INVALID_OUTPUT_ERROR, (Command, Output->Text)));
|
|
|
+}
|
|
|
+//---------------------------------------------------------------------------
|
|
|
+void __fastcall TSCPFileSystem::ExecCommand(TFSCommand Cmd, const TVarRec * args,
|
|
|
+ int size, int Params)
|
|
|
+{
|
|
|
+ if (Params < 0) Params = ecDefault;
|
|
|
+ UnicodeString FullCommand = FCommandSet->FullCommand(Cmd, args, size);
|
|
|
+ UnicodeString Command = FCommandSet->Command(Cmd, args, size);
|
|
|
|
|
|
TOperationVisualizer Visualizer(FTerminal->UseBusyCursor);
|
|
|
|
|
|
- SendCommand(Cmd);
|
|
|
+ SendCommand(Command);
|
|
|
|
|
|
int COParams =
|
|
|
coWaitForLastLine |
|
|
@@ -677,21 +681,8 @@ void __fastcall TSCPFileSystem::ExecCommand(const UnicodeString & Cmd, int Param
|
|
|
FLAGMASK(FLAGSET(Params, ecReadProgress), coReadProgress) |
|
|
|
FLAGMASK(FLAGSET(Params, ecIgnoreStdErr), coIgnoreStdErr);
|
|
|
|
|
|
- ReadCommandOutput(COParams, &CmdString);
|
|
|
-}
|
|
|
-//---------------------------------------------------------------------------
|
|
|
-void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
|
|
|
-{
|
|
|
- FTerminal->TerminalError(FMTLOAD(INVALID_OUTPUT_ERROR, (Command, Output->Text)));
|
|
|
-}
|
|
|
-//---------------------------------------------------------------------------
|
|
|
-void __fastcall TSCPFileSystem::ExecCommand(TFSCommand Cmd, const TVarRec * args,
|
|
|
- int size, int Params)
|
|
|
-{
|
|
|
- if (Params < 0) Params = ecDefault;
|
|
|
- UnicodeString FullCommand = FCommandSet->FullCommand(Cmd, args, size);
|
|
|
- UnicodeString Command = FCommandSet->Command(Cmd, args, size);
|
|
|
- ExecCommand(FullCommand, Params, Command);
|
|
|
+ ReadCommandOutput(COParams, &FullCommand);
|
|
|
+
|
|
|
if (Params & ecRaiseExcept)
|
|
|
{
|
|
|
Integer MinL = FCommandSet->MinLines[Cmd];
|