diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 3918b5a7ae..4f17a3fe19 100755 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -922,6 +922,7 @@ void LLTextureCache::setDirNames(ELLPath location) { std::string delem = gDirUtilp->getDirDelimiter(); + mCacheParentDirName = gDirUtilp->getExpandedFilename(location,""); mHeaderEntriesFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, entries_filename); mHeaderDataFileName = gDirUtilp->getExpandedFilename(location, textures_dirname, cache_filename); mTexturesDirName = gDirUtilp->getExpandedFilename(location, textures_dirname); @@ -998,6 +999,10 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache if (!mReadOnly) { + if (!LLFile::isdir(mCacheParentDirName)) + { + LLFile::mkdir(mCacheParentDirName); + } LLFile::mkdir(mTexturesDirName); const char* subdirs = "0123456789abcdef"; diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 9b266a2805..eebcecf05b 100755 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -201,6 +201,8 @@ private: responder_list_t mCompletedList; BOOL mReadOnly; + + std::string mCacheParentDirName; // HEADERS (Include first mip) std::string mHeaderEntriesFileName;