Revert "apply 1 minute timeout to file listing"

This reverts commit d43983e9
This commit is contained in:
Massimo Melina 2020-06-30 11:05:39 +02:00
parent d43983e986
commit 6625f08419

View File

@ -1,4 +1,4 @@
{ {
Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com) Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com)
This file is part of HFS ~ HTTP File Server. This file is part of HFS ~ HTTP File Server.
@ -35,8 +35,8 @@ uses
HSlib, traylib, monoLib, progFrmLib, classesLib; HSlib, traylib, monoLib, progFrmLib, classesLib;
const const
VERSION = '2.4.0 RC6'; VERSION = '2.4.0 RC7';
VERSION_BUILD = '318'; VERSION_BUILD = '319';
VERSION_STABLE = {$IFDEF STABLE } TRUE {$ELSE} FALSE {$ENDIF}; VERSION_STABLE = {$IFDEF STABLE } TRUE {$ELSE} FALSE {$ENDIF};
CURRENT_VFS_FORMAT :integer = 1; CURRENT_VFS_FORMAT :integer = 1;
CRLF = #13#10; CRLF = #13#10;
@ -1383,7 +1383,6 @@ type
constructor TfileListing.create(); constructor TfileListing.create();
begin begin
dir:=NIL; dir:=NIL;
timeout:=Now()+1/MINUTES;
end; // create end; // create
destructor TfileListing.destroy; destructor TfileListing.destroy;
@ -1666,7 +1665,7 @@ this would let us have "=" inside the names, but names cannot be assigned
repeat repeat
application.ProcessMessages(); application.ProcessMessages();
cd.lastActivityTime:=now(); cd.lastActivityTime:=now();
if cd.lastActivityTime > timeout then if (timeout > 0) and (cd.lastActivityTime > timeout) then
break; break;
// we don't list these entries // we don't list these entries
if (sr.name = '.') or (sr.name = '..') if (sr.name = '.') or (sr.name = '..')
@ -5040,6 +5039,7 @@ var
listing:=TfileListing.create(); listing:=TfileListing.create();
try try
listing.ignoreConnFilter:=ignoreConnFilters; listing.ignoreConnFilter:=ignoreConnFilters;
listing.timeout:= now()+1/MINUTES;
listing.fromFolder( f, data, shouldRecur(data)); listing.fromFolder( f, data, shouldRecur(data));
fIsTemp:=f.isTemp(); fIsTemp:=f.isTemp();
ofs:=length(f.resource)-length(f.name)+1; ofs:=length(f.resource)-length(f.name)+1;