Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-05-17 23:39:12 +0400
committerUnderground78 <underground78@users.sourceforge.net>2013-05-18 12:20:04 +0400
commita588cccc0c64d777ca81414a3e48d5d585f58b5c (patch)
tree48808d641f4d465d676a5528963591adcd1ca3d8 /src
parentbfd7f7e11148961514768ec9d149965d17a77026 (diff)
MiniDump: Ensure that the folder used to store the dump exists.
Diffstat (limited to 'src')
-rw-r--r--src/mpc-hc/MiniDump.cpp6
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 {