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)
|
AvatarManager::InternalReadDirectory(const std::string &dir, AvatarMap &avatars)
|
||||||
{
|
{
|
||||||
bool retVal = true;
|
bool retVal = true;
|
||||||
|
path tmpPath(dir);
|
||||||
|
|
||||||
|
if (exists(tmpPath) && is_directory(tmpPath))
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// This method is not thread safe. Only call after locking the map.
|
// This method is not thread safe. Only call after locking the map.
|
||||||
directory_iterator i(dir);
|
directory_iterator i(tmpPath);
|
||||||
directory_iterator end;
|
directory_iterator end;
|
||||||
|
|
||||||
while (i != 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.");
|
LOG_ERROR("Exception caught when trying to scan avatar directory.");
|
||||||
retVal = false;
|
retVal = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR("Avatar directory does not exist.");
|
||||||
|
retVal = false;
|
||||||
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user