summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-07-20 15:03:22 -0700
committerCallum Prentice <callum@lindenlab.com>2021-07-20 15:03:22 -0700
commite28c1b46e9944f0215a13cab8ee7dded88d7fc90 (patch)
tree2e8f9b040c2ee60d90a7d6929ad67e16a13fd177 /indra/llfilesystem
parent8631a7a07743af00431c6f33361ab06405bcf114 (diff)
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
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/llfilesystem.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index da44e8d98c..b029723e11 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -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;
}