mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
introduced 1 minute timeout for archive's files list building
This commit is contained in:
parent
6c5139d552
commit
b1a95cd319
@ -848,10 +848,12 @@ var
|
||||
|
||||
var
|
||||
i, posBak: int64;
|
||||
n: integer;
|
||||
begin
|
||||
posBak:=pos;
|
||||
p:=@buffer;
|
||||
while (count > 0) and (cur < length(flist)) do
|
||||
n:=length(flist);
|
||||
while (count > 0) and (cur < n) do
|
||||
case where of
|
||||
TW_HEADER:
|
||||
begin
|
||||
|
||||
4
main.pas
4
main.pas
@ -1368,6 +1368,7 @@ type
|
||||
actualCount: integer;
|
||||
public
|
||||
dir: array of Tfile;
|
||||
timeout: TDateTime;
|
||||
ignoreConnFilter: boolean;
|
||||
constructor create();
|
||||
destructor Destroy; override;
|
||||
@ -1661,6 +1662,8 @@ this would let us have "=" inside the names, but names cannot be assigned
|
||||
repeat
|
||||
application.ProcessMessages();
|
||||
cd.lastActivityTime:=now();
|
||||
if cd.lastActivityTime > timeout then
|
||||
break;
|
||||
// we don't list these entries
|
||||
if (sr.name = '.') or (sr.name = '..')
|
||||
or isCommentFile(sr.name) or isFingerprintFile(sr.name) or sameText(sr.name, DIFF_TPL_FILE)
|
||||
@ -5026,6 +5029,7 @@ var
|
||||
listing:=TfileListing.create();
|
||||
try
|
||||
listing.ignoreConnFilter:=ignoreConnFilters;
|
||||
listing.timeout:= now()+1/MINUTES;
|
||||
listing.fromFolder( f, data, shouldRecur(data));
|
||||
fIsTemp:=f.isTemp();
|
||||
ofs:=length(f.resource)-length(f.name)+1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user