diff options
author | Oz Linden <oz@lindenlab.com> | 2017-10-11 09:13:55 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-10-11 09:13:55 -0400 |
commit | d62ad1ef8afc1b9abadbc611d373a7a7d9afc368 (patch) | |
tree | 9f14b141e692c3b78eee846f12fc021feacf1de6 /indra/llcrashlogger | |
parent | c0ac11e24022eb51918e825414f2c04f3085bc61 (diff) | |
parent | b6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff) |
merge changes for 5.0.8-release
Diffstat (limited to 'indra/llcrashlogger')
-rw-r--r-- | indra/llcrashlogger/llcrashlock.cpp | 14 | ||||
-rw-r--r-- | indra/llcrashlogger/llcrashlogger.cpp | 14 |
2 files changed, 19 insertions, 9 deletions
diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp index 7dde1fcd69..77abfbcf0f 100644 --- a/indra/llcrashlogger/llcrashlock.cpp +++ b/indra/llcrashlogger/llcrashlock.cpp @@ -188,12 +188,22 @@ LLSD LLCrashLock::getProcessList() //static bool LLCrashLock::fileExists(std::string filename) { - return boost::filesystem::exists(filename.c_str()); +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path file_path(utf8str_to_utf16str(filename)); +#else + boost::filesystem::path file_path(filename); +#endif + return boost::filesystem::exists(file_path); } void LLCrashLock::cleanupProcess(std::string proc_dir) { - boost::filesystem::remove_all(proc_dir); +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path dir_path(utf8str_to_utf16str(proc_dir)); +#else + boost::filesystem::path dir_path(proc_dir); +#endif + boost::filesystem::remove_all(dir_path); } bool LLCrashLock::putProcessList(const LLSD& proc_sd) diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 9bd142aacc..5e74715500 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -155,9 +155,9 @@ std::string getStartupStateFromLog(std::string& sllog) bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename ) { - std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename); - std::ifstream log_file(db_file_name.c_str()); - + std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename); + llifstream log_file(db_file_name.c_str()); + // Look for it in the given file if (log_file.is_open()) { @@ -186,7 +186,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path) { size_t length=0; - std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); + llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary); if(minidump_stream.is_open()) { minidump_stream.seekg(0, std::ios::end); @@ -287,7 +287,7 @@ void LLCrashLogger::gatherFiles() if (!file.empty()) { LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL; - std::ifstream f(file.c_str()); + llifstream f(file.c_str()); if(f.is_open()) { std::stringstream s; @@ -342,7 +342,7 @@ void LLCrashLogger::gatherFiles() if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) ) { std::string fullname = pathname + *iter; - std::ifstream fdat( fullname.c_str(), std::ifstream::binary); + llifstream fdat(fullname.c_str(), std::ifstream::binary); if (fdat) { char buf[5]; @@ -462,7 +462,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir) updateApplication("Sending reports..."); - std::ofstream out_file(report_file.c_str()); + llofstream out_file(report_file.c_str()); LLSDSerialize::toPrettyXML(post_data, out_file); out_file.flush(); out_file.close(); |