Speculative fix for SL-15547: Viewer hung while looking for a file in the cache - since I am unable to repro, this might be enough

master
Callum Prentice 2021-07-20 15:03:22 -07:00
parent 8631a7a077
commit e28c1b46e9
1 changed files with 8 additions and 5 deletions

View File

@ -165,11 +165,14 @@ BOOL LLFileSystem::read(U8* buffer, S32 bytes)
}
}
// update the last access time for the file - this is required
// even though we are reading and not writing because this is the
// way the cache works - it relies on a valid "last accessed time" for
// each file so it knows how to remove the oldest, unused files
LLDiskCache::getInstance()->updateFileAccessTime(filename);
if (success == TRUE)
{
// update the last access time for the file - this is required
// even though we are reading and not writing because this is the
// way the cache works - it relies on a valid "last accessed time" for
// each file so it knows how to remove the oldest, unused files
LLDiskCache::getInstance()->updateFileAccessTime(filename);
}
return success;
}