summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-03-10 15:47:27 -0400
committerOz Linden <oz@lindenlab.com>2014-03-10 15:47:27 -0400
commit0f3ba54a7ececa4d6f7c247a3ffa3a2f9572268e (patch)
treec7d3d7cc7a6d1a22ad7b69f45ade31ef4780f9e6 /indra/llvfs
parent2b4d3fff706d098076bb6c0a7dce2ca35b83300f (diff)
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
merge changes for 3.7.3-release
Diffstat (limited to 'indra/llvfs')
-rwxr-xr-xindra/llvfs/lldiriterator.cpp23
-rwxr-xr-xindra/llvfs/llvfs.cpp2
2 files changed, 18 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;
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 82c926620a..7b589f5b96 100755
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -578,6 +578,7 @@ LLVFS::~LLVFS()
mFreeBlocksByLength.clear();
for_each(mFreeBlocksByLocation.begin(), mFreeBlocksByLocation.end(), DeletePairedPointer());
+ mFreeBlocksByLocation.clear();
unlockAndClose(mDataFP);
mDataFP = NULL;
@@ -1835,6 +1836,7 @@ void LLVFS::audit()
}
for_each(audit_blocks.begin(), audit_blocks.end(), DeletePointer());
+ audit_blocks.clear();
}