Skip to content

Commit 30a11c7

Browse files
authored
Fix: Fixed issue where FilesLauncher ignored the startup settings (#11740)
1 parent c751de9 commit 30a11c7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
Binary file not shown.

src/Files.OpenDialog/FilesLauncher/FilesLauncher.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
4949
LPWSTR* szArglist = CommandLineToArgvW(GetCommandLine(), &numArgs);
5050
WCHAR openDirectory[MAX_PATH];
5151

52-
if (numArgs > 1)
52+
if (numArgs > 1 && wcsnlen(szArglist[1], 1))
5353
{
5454
swprintf(openDirectory, _countof(openDirectory) - 1, L"%s", szArglist[1]);
5555
std::wcout << openDirectory << std::endl;
@@ -199,8 +199,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
199199
SHELLEXECUTEINFO ShExecInfo = { 0 };
200200
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
201201
ShExecInfo.fMask = SEE_MASK_NOASYNC | SEE_MASK_FLAG_NO_UI;
202-
ShExecInfo.lpFile = L"files-uwp:?cmd=";
203-
ShExecInfo.lpDirectory = openDirectory;
202+
ShExecInfo.lpFile = L"files-uwp:";
204203
ShExecInfo.nShow = SW_SHOW;
205204

206205
if (!ShellExecuteEx(&ShExecInfo))

0 commit comments

Comments
 (0)