mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: deb_wdx - possible crash
This commit is contained in:
parent
2f13be9b42
commit
f02a9ba582
1 changed files with 20 additions and 23 deletions
|
|
@ -132,35 +132,32 @@ begin
|
|||
{$IFDEF GDEBUG}
|
||||
WriteLn('descfile=' + descfile);
|
||||
{$ENDIF}
|
||||
TA := TTarArchive.Create(TarFileName);
|
||||
|
||||
while TA.FindNext(DirRec) do
|
||||
begin
|
||||
{$IFDEF GDEBUG}
|
||||
WriteLn('DirRec.Name=' + DirRec.Name);
|
||||
{$ENDIF}
|
||||
if (DirRec.Name = './control') or (DirRec.Name = '.\control') or (DirRec.Name = 'control') then
|
||||
begin
|
||||
TA.ReadFile(DescFile);
|
||||
Break;
|
||||
try
|
||||
TA := TTarArchive.Create(TarFileName);
|
||||
try
|
||||
while TA.FindNext(DirRec) do
|
||||
begin
|
||||
{$IFDEF GDEBUG}
|
||||
WriteLn('DirRec.Name=' + DirRec.Name);
|
||||
{$ENDIF}
|
||||
if (DirRec.Name = './control') or (DirRec.Name = '.\control') or (DirRec.Name = 'control') then
|
||||
begin
|
||||
TA.ReadFile(DescFile);
|
||||
Result:= True;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
TA.Free;
|
||||
end;
|
||||
except
|
||||
// Ignore
|
||||
end;
|
||||
TA.Free;
|
||||
|
||||
DeleteFile(TarFileName); //foo.tar
|
||||
Result := true;
|
||||
DeleteFile(TarFileName); // foo.tar
|
||||
{$IFDEF GDEBUG}
|
||||
WriteLn('ExtractDebInfoFile');
|
||||
{$ENDIF}
|
||||
(*
|
||||
filelist := '';
|
||||
TA := TarArchive.Create('data.tar.gz');
|
||||
WHILE TA.FindNext(DirRec) DO BEGIN
|
||||
filelist := filelist + DirRec.Name + #13#10;
|
||||
end;
|
||||
TA.Free;
|
||||
*)
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue