diff options
| author | Callum Prentice <callum@gmail.com> | 2020-10-06 18:18:18 -0700 |
|---|---|---|
| committer | Callum Prentice <callum@gmail.com> | 2020-10-06 18:18:18 -0700 |
| commit | a0ea119623b8bda445f86afdb0ea7b5833c8e171 (patch) | |
| tree | 5080c5d902654307306e8a94a9f0ec94a432398f /indra/llfilesystem/llfilesystem.cpp | |
| parent | 56e30615530bf5d1c86fbafee89c9998a079e88f (diff) | |
Replace references to static writefile with write so we end up with only a single read and a single write function
Diffstat (limited to 'indra/llfilesystem/llfilesystem.cpp')
| -rw-r--r-- | indra/llfilesystem/llfilesystem.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index ffc3dee12b..6d6ff3d7e1 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -230,6 +230,12 @@ BOOL LLFileSystem::read(U8 *buffer, S32 bytes, BOOL async, F32 priority) mReadComplete = 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 + LLFileSystem::mDiskCache->updateFileAccessTime(filename); + return success; } @@ -287,13 +293,6 @@ BOOL LLFileSystem::write(const U8 *buffer, S32 bytes) return success; } -//static -BOOL LLFileSystem::writeFile(const U8 *buffer, S32 bytes, const LLUUID &uuid, LLAssetType::EType type) -{ - LLFileSystem file(uuid, type, LLFileSystem::WRITE); - return file.write(buffer, bytes); -} - BOOL LLFileSystem::seek(S32 offset, S32 origin) { if (-1 == origin) |
