mirror of https://gitlab.com/basile.b/dexed.git
sompler
This commit is contained in:
parent
97221ea590
commit
f1e21098a7
|
@ -717,30 +717,7 @@ begin
|
||||||
if not (poUsePipes in aProcess.Options) then
|
if not (poUsePipes in aProcess.Options) then
|
||||||
exit;
|
exit;
|
||||||
//
|
//
|
||||||
sum := 0;
|
aList.LoadFromStream(aProcess.Output);
|
||||||
str := TMemoryStream.Create;
|
|
||||||
try
|
|
||||||
buffSz := aProcess.PipeBufferSize;
|
|
||||||
// temp fix: messages are cut if the TAsyncProcess version is used on simple TProcess.
|
|
||||||
if aProcess is TAsyncProcess then begin
|
|
||||||
while aProcess.Output.NumBytesAvailable <> 0 do begin
|
|
||||||
str.SetSize(sum + buffSz);
|
|
||||||
cnt := aProcess.Output.Read((str.Memory + sum)^, buffSz);
|
|
||||||
sum += cnt;
|
|
||||||
end;
|
|
||||||
end else begin
|
|
||||||
repeat
|
|
||||||
str.SetSize(sum + buffSz);
|
|
||||||
cnt := aProcess.Output.Read((str.Memory + sum)^, buffSz);
|
|
||||||
sum += cnt;
|
|
||||||
until
|
|
||||||
cnt = 0;
|
|
||||||
end;
|
|
||||||
str.Size := sum;
|
|
||||||
aList.LoadFromStream(str);
|
|
||||||
finally
|
|
||||||
str.Free;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure processOutputToStream(aProcess: TProcess; output: TMemoryStream);
|
procedure processOutputToStream(aProcess: TProcess; output: TMemoryStream);
|
||||||
|
|
Loading…
Reference in New Issue