Hand-apply 9c251ca3debbf1e529b77ea4d174994ef8b5dd0b from master:
[dcpomatic.git] / src / lib / util.cc
index 728e7d048199f08652329b078e214039e244bbc1..2b7df86bfbf8fd5e64a6533004b22c2d4a8b22b0 100644 (file)
@@ -282,6 +282,12 @@ LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *)
 }
 #endif
 
+void
+set_backtrace_file (boost::filesystem::path p)
+{
+       backtrace_file = p;
+}
+
 /* From http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c */
 void
 terminate ()
@@ -317,8 +323,9 @@ void
 dcpomatic_setup ()
 {
 #ifdef DCPOMATIC_WINDOWS
-       backtrace_file /= g_get_user_config_dir ();
-       backtrace_file /= "backtrace.txt";
+       boost::filesystem::path p = g_get_user_config_dir ();
+       p /= "backtrace.txt";
+       set_backtrace_file (p);
        SetUnhandledExceptionFilter(exception_handler);
 
        /* Dark voodoo which, I think, gets boost::filesystem::path to