mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:59:19 +02:00
parent
ce87b907ee
commit
91a756e51a
@ -230,7 +230,10 @@ begin
|
|||||||
|
|
||||||
doseek:=false;
|
doseek:=false;
|
||||||
if ((s^.mode='a') and not exists) or (s^.mode='w') then
|
if ((s^.mode='a') and not exists) or (s^.mode='w') then
|
||||||
|
begin
|
||||||
|
|
||||||
ReWrite (s^.gzfile,1)
|
ReWrite (s^.gzfile,1)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Reset (s^.gzfile,1);
|
Reset (s^.gzfile,1);
|
||||||
@ -247,7 +250,9 @@ begin
|
|||||||
// append binary file.
|
// append binary file.
|
||||||
if doseek then
|
if doseek then
|
||||||
seek(s^.gzfile,filesize(s^.gzfile));
|
seek(s^.gzfile,filesize(s^.gzfile));
|
||||||
s^.mode:='w'; // difference append<->write doesn't matter anymore
|
|
||||||
|
if s^.mode='a' then
|
||||||
|
s^.mode:='w'; // difference append<->write doesn't matter anymore
|
||||||
if writing then begin { Write a very simple .gz header }
|
if writing then begin { Write a very simple .gz header }
|
||||||
{$IFNDEF NO_DEFLATE}
|
{$IFNDEF NO_DEFLATE}
|
||||||
gzheader [0] := gz_magic [0];
|
gzheader [0] := gz_magic [0];
|
||||||
|
Loading…
Reference in New Issue
Block a user