summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/bdist_wininst/install.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index e9401d9..a0232d2 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -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),