From d2f66f9bd0a1c815160730330474a94191b7a2a2 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Fri, 29 Apr 2011 00:24:07 -0500 Subject: [PATCH] LLTextureCache is spamming warnings as it attempts to remove non-existant files. Not sure if this is a bug or not, but it's been this way for a while now, so I'm squelching it. --- indra/newview/lltexturecache.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 1716b5c5d..5c27e365a 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -915,10 +915,12 @@ void LLTextureCache::purgeCache(ELLPath location) if(LLFile::isdir(mTexturesDirName)) { std::string file_name = gDirUtilp->getExpandedFilename(location, entries_filename); - LLAPRFile::remove(file_name); + if(LLAPRFile::isExist(file_name)) + LLAPRFile::remove(file_name); file_name = gDirUtilp->getExpandedFilename(location, cache_filename); - LLAPRFile::remove(file_name); + if(LLAPRFile::isExist(file_name)) + LLAPRFile::remove(file_name); purgeAllTextures(true); } @@ -1711,7 +1713,8 @@ void LLTextureCache::purgeTextureFilesTimeSliced(bool force) if (mHeaderIDMap.find(curiter->first) == mHeaderIDMap.end()) { filename = curiter->second; - LLAPRFile::remove(filename); + if(LLAPRFile::isExist(filename)) + LLAPRFile::remove(filename); } else { @@ -1963,7 +1966,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename, b mFreeList.insert(idx); } - if (remove_file) + if (remove_file && LLAPRFile::isExist(filename)) { LLAPRFile::remove(filename); }