FIX: Add file with long name in TAR archive

This commit is contained in:
Alexander Koblov 2013-05-10 07:19:49 +00:00
commit bd555827ef
2 changed files with 14 additions and 2 deletions

View file

@ -1376,9 +1376,9 @@ begin
{ Finally we need to stuff the file type Header. }
{ Note: Value.length > AB_TAR_NAMESIZE(100) }
if LinkFlag = AB_TAR_LF_LONGNAME then
Move(Value[1], PHeader.Name, AB_TAR_NAMESIZE)
Move(Value[1], PTarHeader.Name, AB_TAR_NAMESIZE)
else
Move(Value[1], PHeader.LinkName, AB_TAR_NAMESIZE);
Move(Value[1], PTarHeader.LinkName, AB_TAR_NAMESIZE);
end;
procedure TAbTarItem.SetFileName(const Value: string);

View file

@ -1241,6 +1241,18 @@ Index: AbTarTyp.pas
FTarItem.Dirty := True;
end;
@@ -1297,9 +1376,9 @@
{ Finally we need to stuff the file type Header. }
{ Note: Value.length > AB_TAR_NAMESIZE(100) }
if LinkFlag = AB_TAR_LF_LONGNAME then
- Move(Value[1], PHeader.Name, AB_TAR_NAMESIZE)
+ Move(Value[1], PTarHeader.Name, AB_TAR_NAMESIZE)
else
- Move(Value[1], PHeader.LinkName, AB_TAR_NAMESIZE);
+ Move(Value[1], PTarHeader.LinkName, AB_TAR_NAMESIZE);
end;
procedure TAbTarItem.SetFileName(const Value: string);
@@ -1333,7 +1412,7 @@
OLD_GNU & GNU: Add N Headers for name, Update name in MD header, update name field in File Headers, min 3 headers