]> granicus.if.org Git - python/commitdiff
Update issue 6070 patch to match the patch that was actually tested
authorR. David Murray <rdmurray@bitdance.com>
Tue, 7 Jul 2009 09:54:16 +0000 (09:54 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 7 Jul 2009 09:54:16 +0000 (09:54 +0000)
on Windows.

Python/import.c

index 46a1acc6a269fffcd097ea45130d702ca2d8265b..67c6cb212d632138737d136f039bd423351adbdc 100644 (file)
@@ -881,7 +881,9 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
 {
        FILE *fp;
        time_t mtime = srcstat->st_mtime;
-#ifndef MS_WINDOWS
+#ifdef MS_WINDOWS   /* since Windows uses different permissions  */
+       mode_t mode = srcstat->st_mode & ~S_IEXEC;
+#else
        mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH;
 #endif