[Libreoffice-commits] core.git: desktop/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Feb 27 17:28:53 UTC 2016


 desktop/source/app/crashreport.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 58eea9b92491c8c69785ae2507dac0f6f9bb265e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Feb 27 18:26:34 2016 +0100

    store the crash ini file inside of the user profile
    
    Change-Id: I9d85d3daba288091f9aa406a24b24facf5d20b1e

diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index 6d148c5..f15a36e 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -8,8 +8,11 @@
  */
 
 #include <desktop/crashreport.hxx>
+#include <rtl/bootstrap.hxx>
+#include <osl/file.hxx>
 
 #include <config_version.h>
+#include <config_folders.h>
 
 #include <string>
 #include <fstream>
@@ -42,8 +45,13 @@ void CrashReporter::writeCommonInfo()
 
 std::string CrashReporter::getIniFileName()
 {
-    // TODO: we need a generic solution for the location
-    return "/tmp/dump.ini";
+    OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/crash/");
+    rtl::Bootstrap::expandMacros(url);
+    osl::Directory::create(url);
+
+    OString aUrl = OUStringToOString(url, RTL_TEXTENCODING_UTF8);
+    std::string aRet(aUrl.getStr());
+    return aRet;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list