diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index da44e8d98c2b61336ed1014234e8e001b2a8f1a6..b029723e11811d970948f13c1050f02d3b0f6923 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;
 }