MCPcopy Create free account
hub / github.com/ConEmu/ConEmu / FillTempPath

Function FillTempPath

src/Setup/Setupper/Setupper.cpp:638–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636};
637
638void FillTempPath(const wchar_t* temp_path)
639{
640 if (!temp_path || !*temp_path)
641 {
642 gsTempFolder[0] = 0;
643 }
644 else if (*temp_path == L'"')
645 {
646 // quoted path, e.g.: /e:"C:\Temp Files"
647 lstrcpyn(gsTempFolder, temp_path + 1, countof(gsTempFolder));
648 const int len = lstrlen(gsTempFolder);
649 if (len > 0 && gsTempFolder[len - 1] == L'"')
650 gsTempFolder[len - 1] = L'\0';
651 }
652 else
653 {
654 // non-quoted path, e.g.: "/e:C:\Temp Files"
655 lstrcpyn(gsTempFolder, temp_path, countof(gsTempFolder));
656 }
657}
658
659#ifdef __GNUC__
660int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

Callers 1

_tWinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected