summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-11-22 20:16:37 +0200
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-11-22 20:16:37 +0200
commit2c5e306e14c0cedb57a19bf7f165d57510c5f62e (patch)
tree8b13ca3504982dc3ff380faf633988ec2d49eebc /indra
parent1ae4d45337b380213112183f153a631d4c3f3289 (diff)
MAINT-3474 FIXED crash on startup in LLTextureCache::purgeAllTextures(bool) attempting to delete texture cache
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llvfs/lldiriterator.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index 460d2a8b4f..229608231c 100755
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname)
fs::directory_iterator end_itr; // default construction yields past-the-end
bool found = false;
- while (mIter != end_itr && !found)
+
+ // Check if path is a directory.
+ try
{
- boost::smatch match;
- std::string name = mIter->path().filename().string();
- if (found = boost::regex_match(name, match, mFilterExp))
+ while (mIter != end_itr && !found)
{
- 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;