Skip to content

Commit 3163d6d

Browse files
authored
Merge pull request #1971 from cmderdev/fix_1.3.9
fix initial launch of cmder starting with conemu default cfg
2 parents 378ebff + 5c7f494 commit 3163d6d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

launcher/src/CmderLauncher.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,16 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
319319
}
320320
}
321321
}
322+
else {
323+
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
324+
{
325+
MessageBox(NULL,
326+
(GetLastError() == ERROR_ACCESS_DENIED)
327+
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
328+
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
329+
exit(1);
330+
}
331+
}
322332
}
323333
else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
324334
{

0 commit comments

Comments
 (0)