https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b1519f65a7d1ce87d612af4862f3e7ba8cd95b8c

commit b1519f65a7d1ce87d612af4862f3e7ba8cd95b8c
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Wed May 13 22:36:44 2020 +0900
Commit:     GitHub <[email protected]>
CommitDate: Wed May 13 22:36:44 2020 +0900

    [MPLAY32] Don't hardcode C: drive (#2778)
    
    CORE-13235
---
 base/applications/mplay32/mplay32.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/base/applications/mplay32/mplay32.c 
b/base/applications/mplay32/mplay32.c
index 06694d517ae..f3df906dcf9 100644
--- a/base/applications/mplay32/mplay32.c
+++ b/base/applications/mplay32/mplay32.c
@@ -1149,22 +1149,15 @@ OpenFileDialog(HWND hwnd, DWORD dwFilterIndex, LPTSTR 
lpType)
 {
     OPENFILENAME OpenFileName;
     TCHAR szFile[MAX_PATH + 1] = _T("");
-    TCHAR szCurrentDir[MAX_PATH];
 
     ZeroMemory(&OpenFileName, sizeof(OpenFileName));
 
-    if (!GetCurrentDirectory(ARRAYSIZE(szCurrentDir), szCurrentDir))
-    {
-        StringCbCopy(szCurrentDir, sizeof(szCurrentDir), _T("c:\\"));
-    }
-
     OpenFileName.lStructSize     = sizeof(OpenFileName);
     OpenFileName.hwndOwner       = hwnd;
     OpenFileName.hInstance       = hInstance;
     OpenFileName.lpstrFilter     = szFilter;
     OpenFileName.lpstrFile       = szFile;
     OpenFileName.nMaxFile        = ARRAYSIZE(szFile);
-    OpenFileName.lpstrInitialDir = szCurrentDir;
     OpenFileName.Flags           = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | 
OFN_HIDEREADONLY | OFN_SHAREAWARE;
     OpenFileName.lpstrDefExt     = _T("\0");
     OpenFileName.nFilterIndex = dwFilterIndex;

Reply via email to