Skip to content
Snippets Groups Projects
Commit 2c5e306e authored by maksymsproductengine's avatar maksymsproductengine
Browse files

MAINT-3474 FIXED crash on startup in LLTextureCache::purgeAllTextures(bool)...

MAINT-3474 FIXED crash on startup in LLTextureCache::purgeAllTextures(bool) attempting to delete texture cache
parent 1ae4d453
No related branches found
No related tags found
No related merge requests found
...@@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname) ...@@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname)
fs::directory_iterator end_itr; // default construction yields past-the-end fs::directory_iterator end_itr; // default construction yields past-the-end
bool found = false; bool found = false;
while (mIter != end_itr && !found)
// Check if path is a directory.
try
{ {
boost::smatch match; while (mIter != end_itr && !found)
std::string name = mIter->path().filename().string();
if (found = boost::regex_match(name, match, mFilterExp))
{ {
fname = name; boost::smatch match;
std::string name = mIter->path().filename().string();
if (found = boost::regex_match(name, match, mFilterExp))
{
fname = name;
}
++mIter;
} }
}
++mIter; catch (const fs::filesystem_error& e)
{
llwarns << e.what() << llendl;
} }
return found; return found;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment