浏览代码

* (runcommand), fix for corruption of outputstring if command fails with
an exception. Patch by Ludo #22328

git-svn-id: trunk@21739 -

marco 13 年之前
父节点
当前提交
b603182f1a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/fcl-process/src/process.pp

+ 1 - 1
packages/fcl-process/src/process.pp

@@ -465,8 +465,8 @@ begin
   try
   try
     try
     try
     p.Options :=  [poUsePipes];
     p.Options :=  [poUsePipes];
-    p.Execute;
     bytesread:=0;
     bytesread:=0;
+    p.Execute;
     while p.Running do
     while p.Running do
       begin          
       begin          
         Setlength(outputstring,BytesRead + READ_BYTES);
         Setlength(outputstring,BytesRead + READ_BYTES);