Avoid crash if main cache directory does not exist.
parent
1cfe6a68cf
commit
37e7b276db
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ private:
|
|||
responder_list_t mCompletedList;
|
||||
|
||||
BOOL mReadOnly;
|
||||
|
||||
std::string mCacheParentDirName;
|
||||
|
||||
// HEADERS (Include first mip)
|
||||
std::string mHeaderEntriesFileName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue