set NSIS Error title for invalid temporary directory error message
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3633 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
cd663b221e
commit
e1deb281f7
1 changed files with 6 additions and 5 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "ui.h"
|
||||
#include "lang.h"
|
||||
#include "state.h"
|
||||
#include "exec.h"
|
||||
|
||||
#if !defined(NSIS_CONFIG_VISIBLE_SUPPORT) && !defined(NSIS_CONFIG_SILENT_SUPPORT)
|
||||
#error One of NSIS_CONFIG_SILENT_SUPPORT or NSIS_CONFIG_VISIBLE_SUPPORT must be defined.
|
||||
|
@ -63,8 +64,8 @@ char *ValidateTempDir()
|
|||
return NULL;
|
||||
addtrailingslash(state_temp_dir);
|
||||
CreateDirectory(state_temp_dir, NULL);
|
||||
// g_caption is used as a temp var here
|
||||
return my_GetTempFileName(g_caption, state_temp_dir);
|
||||
// state_command_line is used as a temp var here
|
||||
return my_GetTempFileName(state_command_line, state_temp_dir);
|
||||
}
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow)
|
||||
|
@ -87,6 +88,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
}
|
||||
#endif
|
||||
|
||||
mystrcpy(g_caption,_LANG_GENERIC_ERROR);
|
||||
|
||||
GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
|
||||
if (!ValidateTempDir())
|
||||
{
|
||||
|
@ -97,9 +100,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
goto end;
|
||||
}
|
||||
}
|
||||
DeleteFile(g_caption);
|
||||
|
||||
mystrcpy(g_caption,_LANG_GENERIC_ERROR);
|
||||
DeleteFile(state_command_line);
|
||||
|
||||
lstrcpyn(state_command_line, GetCommandLine(), NSIS_MAX_STRLEN);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue