Skip to content
This repository
Browse code

Merge pull request #3285 from Skixbmc/WIN32Exception

[Win32] fixed: stack and dump writer couldn't handle smb paths
  • Loading branch information...
commit 0acee901787540127982d3ee7b2d0dc3f12abb31 2 parents 3757f41 + 72fdffd
wsoltys authored September 17, 2013
8  xbmc/threads/platform/win/Win32Exception.cpp
@@ -115,17 +115,17 @@ bool win32_exception::write_minidump(EXCEPTION_POINTERS* pEp)
115 115
 {
116 116
   // Create the dump file where the xbmc.exe resides
117 117
   bool returncode = false;
118  
-  CStdString dumpFileName;
  118
+  std::string dumpFileName;
119 119
   CStdStringW dumpFileNameW;
120 120
   SYSTEMTIME stLocalTime;
121 121
   GetLocalTime(&stLocalTime);
122 122
 
123  
-  dumpFileName.Format("xbmc_crashlog-%s-%04d%02d%02d-%02d%02d%02d.dmp",
  123
+  dumpFileName = StringUtils::Format("xbmc_crashlog-%s-%04d%02d%02d-%02d%02d%02d.dmp",
124 124
                       mVersion.c_str(),
125 125
                       stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
126 126
                       stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond);
127 127
 
128  
-  dumpFileName.Format("%s\\%s", CWIN32Util::GetProfilePath().c_str(), CUtil::MakeLegalFileName(dumpFileName));
  128
+  dumpFileName = StringUtils::Format("%s\%s", CWIN32Util::SmbToUnc(CWIN32Util::GetProfilePath()).c_str(), CUtil::MakeLegalFileName(dumpFileName).c_str());
129 129
 
130 130
   g_charsetConverter.utf8ToW(dumpFileName, dumpFileNameW, false);
131 131
   HANDLE hDumpFile = CreateFileW(dumpFileNameW.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
@@ -225,7 +225,7 @@ bool win32_exception::write_stacktrace(EXCEPTION_POINTERS* pEp)
225 225
                                       stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
226 226
                                       stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond);
227 227
 
228  
-  dumpFileName = StringUtils::Format("%s\\%s", CWIN32Util::GetProfilePath().c_str(), CUtil::MakeLegalFileName(dumpFileName));
  228
+  dumpFileName = StringUtils::Format("%s\%s", CWIN32Util::SmbToUnc(CWIN32Util::GetProfilePath()).c_str(), CUtil::MakeLegalFileName(dumpFileName).c_str());
229 229
 
230 230
   g_charsetConverter.utf8ToW(dumpFileName, dumpFileNameW, false);
231 231
   HANDLE hDumpFile = CreateFileW(dumpFileNameW.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);

0 notes on commit 0acee90

Please sign in to comment.
Something went wrong with that request. Please try again.