This commit is contained in:
Benjamin Peterson 2014-11-27 20:41:36 -06:00
commit 2292defb3d
1 changed files with 10 additions and 0 deletions

View File

@ -1774,6 +1774,16 @@ static BOOL OpenLogfile(char *dir)
sprintf(buffer, "%s\\%s-wininst.log", dir, meta_name);
logfile = fopen(buffer, "a");
if (!logfile) {
char error[1024];
sprintf(error, "Can't create \"%s\" (%s).\n\n"
"Try to execute the installer as administrator.",
buffer, strerror(errno));
MessageBox(GetFocus(), error, NULL, MB_OK | MB_ICONSTOP);
return FALSE;
}
time(&ltime);
now = localtime(&ltime);
strftime(buffer, sizeof(buffer),