Fixed MemoryStream Issue
This commit is contained in:
parent
624bf3fd33
commit
7acff75b48
1 changed files with 6 additions and 0 deletions
|
|
@ -14934,6 +14934,8 @@ begin
|
|||
result:=TFileStream(aStream).Flush;
|
||||
end else if aStream is TPasRISCVFileMappedStream then begin
|
||||
result:=TPasRISCVFileMappedStream(aStream).Flush;
|
||||
end else if aStream is TCustomMemoryStream then begin
|
||||
result:=true; // A purely in-memory stream has nothing to flush, so this trivially succeeds.
|
||||
end else begin
|
||||
result:=false;
|
||||
end;
|
||||
|
|
@ -14948,6 +14950,8 @@ begin
|
|||
result:=FlushFileBuffers(TFileStream(aStream).Handle);
|
||||
end else if aStream is TPasRISCVFileMappedStream then begin
|
||||
result:=TPasRISCVFileMappedStream(aStream).Flush;
|
||||
end else if aStream is TCustomMemoryStream then begin
|
||||
result:=true; // A purely in-memory stream has nothing to flush, so this trivially succeeds.
|
||||
end else begin
|
||||
result:=false;
|
||||
end;
|
||||
|
|
@ -14960,6 +14964,8 @@ begin
|
|||
if assigned(aStream) then begin
|
||||
if aStream is TPasRISCVFileMappedStream then begin
|
||||
result:=TPasRISCVFileMappedStream(aStream).Flush;
|
||||
end else if aStream is TCustomMemoryStream then begin
|
||||
result:=true; // A purely in-memory stream has nothing to flush, so this trivially succeeds.
|
||||
end else begin
|
||||
result:=false;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue