mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:46:00 +02:00
--- Merging r44125 into '.':
U packages/paszlib/src/zipper.pp --- Recording mergeinfo for merge of r44125 into '.': U . --- Merging r44126 into '.': G packages/paszlib/src/zipper.pp --- Recording mergeinfo for merge of r44126 into '.': G . # revisions: 44125,44126 git-svn-id: branches/fixes_3_2@44129 -
This commit is contained in:
parent
09a2fabb43
commit
e4165fa85f
@ -34,6 +34,7 @@ Const
|
|||||||
ZIP64_HEADER_ID = $0001;
|
ZIP64_HEADER_ID = $0001;
|
||||||
// infozip unicode path
|
// infozip unicode path
|
||||||
INFOZIP_UNICODE_PATH_ID = $7075;
|
INFOZIP_UNICODE_PATH_ID = $7075;
|
||||||
|
EFS_LANGUAGE_ENCODING_FLAG = $800;
|
||||||
|
|
||||||
const
|
const
|
||||||
OS_FAT = 0; //MS-DOS and OS/2 (FAT/VFAT/FAT32)
|
OS_FAT = 0; //MS-DOS and OS/2 (FAT/VFAT/FAT32)
|
||||||
@ -2275,7 +2276,7 @@ end;
|
|||||||
|
|
||||||
procedure TUnZipper.ReadZipHeader(Item: TFullZipFileEntry; out AMethod: Word);
|
procedure TUnZipper.ReadZipHeader(Item: TFullZipFileEntry; out AMethod: Word);
|
||||||
Var
|
Var
|
||||||
S : String;
|
S : RawByteString;
|
||||||
U : UTF8String;
|
U : UTF8String;
|
||||||
D : TDateTime;
|
D : TDateTime;
|
||||||
ExtraFieldHdr: Extensible_Data_Field_Header_Type;
|
ExtraFieldHdr: Extensible_Data_Field_Header_Type;
|
||||||
@ -2295,6 +2296,8 @@ Begin
|
|||||||
Item.FBitFlags:=Bit_Flag;
|
Item.FBitFlags:=Bit_Flag;
|
||||||
SetLength(S,Filename_Length);
|
SetLength(S,Filename_Length);
|
||||||
FZipStream.ReadBuffer(S[1],Filename_Length);
|
FZipStream.ReadBuffer(S[1],Filename_Length);
|
||||||
|
if Bit_Flag and EFS_LANGUAGE_ENCODING_FLAG <> 0 then
|
||||||
|
SetCodePage(S, CP_UTF8, False);
|
||||||
Item.ArchiveFileName:=S;
|
Item.ArchiveFileName:=S;
|
||||||
Item.DiskFileName:=S;
|
Item.DiskFileName:=S;
|
||||||
SavePos:=FZipStream.Position; //after filename, before extra fields
|
SavePos:=FZipStream.Position; //after filename, before extra fields
|
||||||
@ -2506,7 +2509,7 @@ Var
|
|||||||
Zip64Field: Zip64_Extended_Info_Field_Type;
|
Zip64Field: Zip64_Extended_Info_Field_Type;
|
||||||
NewNode : TFullZipFileEntry;
|
NewNode : TFullZipFileEntry;
|
||||||
D : TDateTime;
|
D : TDateTime;
|
||||||
S : String;
|
S : RawByteString;
|
||||||
U : UTF8String;
|
U : UTF8String;
|
||||||
// infozip unicode path
|
// infozip unicode path
|
||||||
Infozip_unicode_path_ver : byte; // always 1
|
Infozip_unicode_path_ver : byte; // always 1
|
||||||
@ -2561,6 +2564,8 @@ Begin
|
|||||||
NewNode.FBitFlags:=Bit_Flag;
|
NewNode.FBitFlags:=Bit_Flag;
|
||||||
SetLength(S,Filename_Length);
|
SetLength(S,Filename_Length);
|
||||||
FZipStream.ReadBuffer(S[1],Filename_Length);
|
FZipStream.ReadBuffer(S[1],Filename_Length);
|
||||||
|
if Bit_Flag and EFS_LANGUAGE_ENCODING_FLAG <> 0 then
|
||||||
|
SetCodePage(S, CP_UTF8, False);
|
||||||
SavePos:=FZipStream.Position; //After fixed part of central directory...
|
SavePos:=FZipStream.Position; //After fixed part of central directory...
|
||||||
// and the filename; before any extra field(s)
|
// and the filename; before any extra field(s)
|
||||||
NewNode.ArchiveFileName:=S;
|
NewNode.ArchiveFileName:=S;
|
||||||
@ -2805,7 +2810,7 @@ Begin
|
|||||||
end
|
end
|
||||||
else if Item.IsDirectory then
|
else if Item.IsDirectory then
|
||||||
begin
|
begin
|
||||||
if (NOT Flat) then CreateDir(OutputFileName);
|
if (NOT Flat) then ForceDirectories(OutputFileName);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user