MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / UpdateWorkingDir

Function UpdateWorkingDir

source/script2.cpp:7671–7681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7669
7670
7671void UpdateWorkingDir(LPTSTR aNewDir)
7672// aNewDir is NULL or a path which was just passed to SetCurrentDirectory().
7673{
7674 TCHAR buf[T_MAX_PATH]; // Windows 10 long path awareness enables working dir to exceed MAX_PATH.
7675 // GetCurrentDirectory() is called explicitly, in case aNewDir is a relative path.
7676 // We want to store the absolute path:
7677 if (GetCurrentDirectory(_countof(buf), buf)) // Might never fail in this case, but kept for backward compatibility.
7678 aNewDir = buf;
7679 if (aNewDir)
7680 g_WorkingDir.SetString(aNewDir);
7681}
7682
7683
7684

Callers 2

_tWinMainFunction · 0.85
SetWorkingDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected