mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 03:59:13 +02:00
* fix building of zipper.pp as suggested by Jeppe Johansen
git-svn-id: trunk@22298 -
This commit is contained in:
parent
6290526821
commit
0214dd68f9
@ -682,8 +682,8 @@ Var
|
|||||||
begin
|
begin
|
||||||
CRC32Val:=$FFFFFFFF;
|
CRC32Val:=$FFFFFFFF;
|
||||||
Buf:=GetMem(FBufferSize);
|
Buf:=GetMem(FBufferSize);
|
||||||
if FOnPercent = 0 then
|
if FOnPercent = 0 then
|
||||||
FOnPercent := 1;
|
FOnPercent := 1;
|
||||||
OnBytes:=Round((FInFile.Size * FOnPercent) / 100);
|
OnBytes:=Round((FInFile.Size * FOnPercent) / 100);
|
||||||
BytesNow:=0; NextMark := OnBytes;
|
BytesNow:=0; NextMark := OnBytes;
|
||||||
FSize:=FInfile.Size;
|
FSize:=FInfile.Size;
|
||||||
@ -705,7 +705,7 @@ begin
|
|||||||
if (FSize>0) and assigned(FOnProgress) Then
|
if (FSize>0) and assigned(FOnProgress) Then
|
||||||
FOnProgress(self,100 * ( BytesNow / FSize));
|
FOnProgress(self,100 * ( BytesNow / FSize));
|
||||||
inc(NextMark,OnBytes);
|
inc(NextMark,OnBytes);
|
||||||
end;
|
end;
|
||||||
Until (Count=0);
|
Until (Count=0);
|
||||||
Finally
|
Finally
|
||||||
C.Free;
|
C.Free;
|
||||||
@ -1594,8 +1594,8 @@ Begin
|
|||||||
as directory separator. We don't want that behaviour
|
as directory separator. We don't want that behaviour
|
||||||
here, since 'abc\' is a valid file name under Unix.
|
here, since 'abc\' is a valid file name under Unix.
|
||||||
|
|
||||||
(mantis 15836) On the other hand, many archives on
|
(mantis 15836) On the other hand, many archives on
|
||||||
windows have '/' as pathseparator, even Windows
|
windows have '/' as pathseparator, even Windows
|
||||||
generated .odt files. So we disable this for windows.
|
generated .odt files. So we disable this for windows.
|
||||||
}
|
}
|
||||||
OldDirectorySeparators:=AllowDirectorySeparators;
|
OldDirectorySeparators:=AllowDirectorySeparators;
|
||||||
@ -1606,7 +1606,7 @@ Begin
|
|||||||
OutStream:=Nil;
|
OutStream:=Nil;
|
||||||
If Assigned(FOnCreateStream) then
|
If Assigned(FOnCreateStream) then
|
||||||
FOnCreateStream(Self, OutStream, Item);
|
FOnCreateStream(Self, OutStream, Item);
|
||||||
// If FOnCreateStream didn't create one, we create one now.
|
// If FOnCreateStream didn't create one, we create one now.
|
||||||
If (OutStream=Nil) then
|
If (OutStream=Nil) then
|
||||||
Begin
|
Begin
|
||||||
if (Path<>'') then
|
if (Path<>'') then
|
||||||
@ -1738,7 +1738,7 @@ end;
|
|||||||
Procedure TUnZipper.ReadZipDirectory;
|
Procedure TUnZipper.ReadZipDirectory;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
i,
|
i : LongInt;
|
||||||
EndHdrPos,
|
EndHdrPos,
|
||||||
CenDirPos : Int64;
|
CenDirPos : Int64;
|
||||||
NewNode : TFullZipFileEntry;
|
NewNode : TFullZipFileEntry;
|
||||||
@ -2150,7 +2150,7 @@ Procedure TZipFileEntries.AddFileEntries(Const List : TStrings);
|
|||||||
|
|
||||||
Var
|
Var
|
||||||
I : integer;
|
I : integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
For I:=0 to List.Count-1 do
|
For I:=0 to List.Count-1 do
|
||||||
AddFileEntry(List[i]);
|
AddFileEntry(List[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user