Browse Source

Bug 1406: Log that user aborted the script in XML log

https://winscp.net/tracker/1406

Source commit: 4eba0db3151081ff3370a2b76426401d80a7f412
Martin Prikryl 9 years ago
parent
commit
69905fa045
1 changed files with 6 additions and 0 deletions
  1. 6 0
      source/windows/ConsoleRunner.cpp

+ 6 - 0
source/windows/ConsoleRunner.cpp

@@ -1189,6 +1189,12 @@ void __fastcall TConsoleRunner::NotifyAbort()
   if (FBatchScript)
   {
     FAborted = true;
+
+    if (FScript->Terminal != NULL)
+    {
+      std::unique_ptr<TStringList> Failure(TextToStringList(LoadStr(USER_TERMINATED)));
+      FScript->Terminal->ActionLog->AddFailure(Failure.get());
+    }
   }
 }
 //---------------------------------------------------------------------------