diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-05-17 23:39:12 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-05-18 12:20:04 +0400 |
commit | a588cccc0c64d777ca81414a3e48d5d585f58b5c (patch) | |
tree | 48808d641f4d465d676a5528963591adcd1ca3d8 /src | |
parent | bfd7f7e11148961514768ec9d149965d17a77026 (diff) |
MiniDump: Ensure that the folder used to store the dump exists.
Diffstat (limited to 'src')
-rw-r--r-- | src/mpc-hc/MiniDump.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mpc-hc/MiniDump.cpp b/src/mpc-hc/MiniDump.cpp index b9c988aed..8ae11cfa7 100644 --- a/src/mpc-hc/MiniDump.cpp +++ b/src/mpc-hc/MiniDump.cpp @@ -117,6 +117,12 @@ LONG WINAPI CMiniDump::UnhandledExceptionFilter(_EXCEPTION_POINTERS* lpTopLevelE strDumpPath.ReleaseBuffer();
strDumpPath.Append(_T("\\Media Player Classic\\"));
+
+ // Check that the folder actually exists
+ if (!FileExists(strDumpPath)) {
+ VERIFY(CreateDirectory(strDumpPath, nullptr));
+ }
+
strDumpPath.Append(AfxGetApp()->m_pszExeName);
strDumpPath.Append(_T(".exe"));
} else {
|