diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-01-26 13:53:21 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-01-27 11:25:39 +0000 |
commit | 6fd00998fa63e4f679b4dd00d7a2a7d45f4a30f4 (patch) | |
tree | 7d26b89c7721f0bbb568ef687e65e1bcc5a76bf2 /desktop | |
parent | 3aae650d0f6688eb0c35ec4d36654efe508977da (diff) |
Put crash directory config in soffice.ini, instead of own ini file
Change-Id: I3a7aa394792c47c6c5a3a553174d177e66ade617
Reviewed-on: https://gerrit.libreoffice.org/33582
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/crashreport.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index ce083d8c6ace..2d104e0acc8e 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -92,12 +92,20 @@ namespace { OUString getCrashDirectory() { - OUString aCrashURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("crashreport") ":CrashDirectory}/"); - rtl::Bootstrap::expandMacros(aCrashURL); + OUString aCrashURL; + rtl::Bootstrap::get("CrashDirectory", aCrashURL); // Need to convert to URL in case of user-defined path osl::FileBase::getFileURLFromSystemPath(aCrashURL, aCrashURL); - osl::Directory::create(aCrashURL); + if (aCrashURL.isEmpty()) { // Fall back to user profile + aCrashURL = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/crash/"; + rtl::Bootstrap::expandMacros(aCrashURL); + } + + if (!aCrashURL.endsWith("/")) + aCrashURL += "/"; + + osl::Directory::create(aCrashURL); OUString aCrashPath; osl::FileBase::getSystemPathFromFileURL(aCrashURL, aCrashPath); return aCrashPath; |