[Python-checkins] cpython (merge 3.4 -> default): merge 3.4 (#16561)

benjamin.peterson python-checkins at python.org
Fri Nov 28 03:41:54 CET 2014


https://hg.python.org/cpython/rev/ef5bbdc81796
changeset:   93639:ef5bbdc81796
parent:      93634:c605dcf9786f
parent:      93638:caee1eabba1e
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Nov 27 20:41:36 2014 -0600
summary:
  merge 3.4 (#16561)

files:
  PC/bdist_wininst/install.c |  10 ++++++++++
  1 files changed, 10 insertions(+), 0 deletions(-)


diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -1774,6 +1774,16 @@
 
     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),

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list