Workaround for boost uncaught exception problem on MacOS 10.5.
This commit is contained in:
@@ -515,10 +515,14 @@ bool
|
||||
AvatarManager::InternalReadDirectory(const std::string &dir, AvatarMap &avatars)
|
||||
{
|
||||
bool retVal = true;
|
||||
path tmpPath(dir);
|
||||
|
||||
if (exists(tmpPath) && is_directory(tmpPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
// This method is not thread safe. Only call after locking the map.
|
||||
directory_iterator i(dir);
|
||||
directory_iterator i(tmpPath);
|
||||
directory_iterator end;
|
||||
|
||||
while (i != end)
|
||||
@@ -541,6 +545,12 @@ AvatarManager::InternalReadDirectory(const std::string &dir, AvatarMap &avatars)
|
||||
LOG_ERROR("Exception caught when trying to scan avatar directory.");
|
||||
retVal = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("Avatar directory does not exist.");
|
||||
retVal = false;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user