summaryrefslogtreecommitdiff
path: root/desktop/source/app/crashreport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app/crashreport.cxx')
-rw-r--r--desktop/source/app/crashreport.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index 7ec47236535a..ce083d8c6ace 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -90,15 +90,17 @@ void CrashReporter::writeCommonInfo()
namespace {
-OUString getCrashUserProfileDirectory()
+OUString getCrashDirectory()
{
- OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/crash/");
- rtl::Bootstrap::expandMacros(url);
- osl::Directory::create(url);
-
- OUString aProfilePath;
- osl::FileBase::getSystemPathFromFileURL(url, aProfilePath);
- return aProfilePath;
+ OUString aCrashURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("crashreport") ":CrashDirectory}/");
+ rtl::Bootstrap::expandMacros(aCrashURL);
+ // Need to convert to URL in case of user-defined path
+ osl::FileBase::getFileURLFromSystemPath(aCrashURL, aCrashURL);
+ osl::Directory::create(aCrashURL);
+
+ OUString aCrashPath;
+ osl::FileBase::getSystemPathFromFileURL(aCrashURL, aCrashPath);
+ return aCrashPath;
}
}
@@ -106,12 +108,12 @@ OUString getCrashUserProfileDirectory()
void CrashReporter::updateMinidumpLocation()
{
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
- OUString aURL = getCrashUserProfileDirectory();
+ OUString aURL = getCrashDirectory();
OString aOStringUrl = OUStringToOString(aURL, RTL_TEXTENCODING_UTF8);
google_breakpad::MinidumpDescriptor descriptor(aOStringUrl.getStr());
mpExceptionHandler->set_minidump_descriptor(descriptor);
#elif defined WNT
- OUString aURL = getCrashUserProfileDirectory();
+ OUString aURL = getCrashDirectory();
mpExceptionHandler->set_dump_path(aURL.getStr());
#endif
}
@@ -123,7 +125,7 @@ void CrashReporter::storeExceptionHandler(google_breakpad::ExceptionHandler* pEx
std::string CrashReporter::getIniFileName()
{
- OUString url = getCrashUserProfileDirectory() + "dump.ini";
+ OUString url = getCrashDirectory() + "dump.ini";
OString aUrl = OUStringToOString(url, RTL_TEXTENCODING_UTF8);
std::string aRet(aUrl.getStr());
return aRet;