[EXPLORER] 'Run' (Win+R) should set the proper current directory (#593)

This commit is contained in:
Katayama Hirofumi MZ
2018-06-21 18:18:57 +02:00
committed by Hermès BÉLUSCA - MAÏTO
parent c771a6d339
commit c84f398306
+8 -1
View File
@@ -2,6 +2,7 @@
* ReactOS Explorer
*
* Copyright 2006 - 2007 Thomas Weidenmueller <[email protected]>
* Copyright 2018 Katayama Hirofumi MZ <[email protected]>
*
* this library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -365,7 +366,13 @@ public:
m_RunFileDlgOwner = hwnd;
RunFileDlg(hwnd, NULL, NULL, NULL, NULL, RFF_CALCDIRECTORY);
// build the default directory from two environment variables
CStringW strDefaultDir, strHomePath;
strDefaultDir.GetEnvironmentVariable(L"HOMEDRIVE");
strHomePath.GetEnvironmentVariable(L"HOMEPATH");
strDefaultDir += strHomePath;
RunFileDlg(hwnd, NULL, (LPCWSTR)strDefaultDir, NULL, NULL, RFF_CALCDIRECTORY);
m_RunFileDlgOwner = NULL;
::DestroyWindow(hwnd);