summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-28 02:41:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-28 02:41:36 (GMT)
commit2292defb3d3c117cf89486713fbb00222656accb (patch)
tree40844669479ceaa96818f993702e7822325faea0 /PC
parent0a99b2ab61e506da60d9c48e440412a75399d4d0 (diff)
parent25c7d3fb2125f964fe5b9317b31de39117072150 (diff)
downloadcpython-2292defb3d3c117cf89486713fbb00222656accb.zip
cpython-2292defb3d3c117cf89486713fbb00222656accb.tar.gz
cpython-2292defb3d3c117cf89486713fbb00222656accb.tar.bz2
merge 3.4 (#16561)
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),