process command line before setting temporary directory to give the user a chance to use /S
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4903 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8ecaea19a5
commit
d01e124228
1 changed files with 12 additions and 12 deletions
|
@ -95,18 +95,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
|
||||
mystrcpy(g_caption,_LANG_GENERIC_ERROR);
|
||||
|
||||
GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
|
||||
if (!ValidateTempDir())
|
||||
{
|
||||
GetWindowsDirectory(state_temp_dir, NSIS_MAX_STRLEN - 5); // leave space for \Temp
|
||||
mystrcat(state_temp_dir, "\\Temp");
|
||||
if (!ValidateTempDir())
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
DeleteFile(state_command_line);
|
||||
|
||||
mystrcpy(state_command_line, GetCommandLine());
|
||||
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
@ -165,6 +153,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
cmdline++;
|
||||
}
|
||||
|
||||
GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
|
||||
if (!ValidateTempDir())
|
||||
{
|
||||
GetWindowsDirectory(state_temp_dir, NSIS_MAX_STRLEN - 5); // leave space for \Temp
|
||||
mystrcat(state_temp_dir, "\\Temp");
|
||||
if (!ValidateTempDir())
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
DeleteFile(state_command_line);
|
||||
|
||||
m_Err = loadHeaders(cl_flags);
|
||||
if (m_Err) goto end;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue