This commit is contained in:
Glenn Maynard
2004-08-30 05:22:50 +00:00
parent f65af6bf6d
commit b5fd173a67
+10 -11
View File
@@ -244,24 +244,23 @@ FileSet *FilenameDB::GetFileSet( CString dir, bool create )
return i->second;
}
FileSet *ret;
if( i != dirs.end() )
{
if( ExpireSeconds != -1 && i->second->age.PeekDeltaTime() >= ExpireSeconds )
if( ExpireSeconds == -1 || i->second->age.PeekDeltaTime() < ExpireSeconds )
{
ret = i->second;
ret->age.Touch();
ret->files.clear();
} else
/* Found it, and it hasn't expired. */
return i->second;
}
else
{
ret = new FileSet;
AddFileSet( dir, ret );
}
delete i->second;
dirs.erase( i );
}
FileSet *ret = new FileSet;
PopulateFileSet( *ret, dir );
AddFileSet( dir, ret );
return ret;
}