summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-07-07 09:54:16 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-07-07 09:54:16 (GMT)
commit3310a10a68228c4a84a2ed517af6b0b81e7f0b15 (patch)
tree8f2b86604a815a3eac8133e4ef5ab62eb00b42e7 /Python
parentc71fae5ad7d3742764adc317b905fd7e297d12bf (diff)
downloadcpython-3310a10a68228c4a84a2ed517af6b0b81e7f0b15.zip
cpython-3310a10a68228c4a84a2ed517af6b0b81e7f0b15.tar.gz
cpython-3310a10a68228c4a84a2ed517af6b0b81e7f0b15.tar.bz2
Update issue 6070 patch to match the patch that was actually tested
on Windows.
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 46a1acc6..67c6cb2 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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