From c8cb600ba690a2f2ae68b76b2cf641f2e7678244 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 2 Oct 2013 02:59:40 +0200 Subject: [PATCH] Breakpad: workaround for boost crash on Linux --- indra/llvfs/lldir.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index bb35c4fe4..df87d1d34 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -179,8 +179,15 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) U32 LLDir::deleteDirAndContents(const std::string& dir_name) { - //Removes the directory and its contents. Returns number of files removed. - return boost::filesystem::remove_all(dir_name); + //Removes the directory and its contents. Returns number of files removed. +#if defined(LL_LINUX) + // Singu TODO: Workaround for boost crashing on linux + deleteFilesInDir(dir_name, "*"); + boost::filesystem::remove(dir_name); + return 1; +#else + return boost::filesystem::remove_all(dir_name); +#endif } const std::string LLDir::findFile(const std::string &filename,