diff options
| author | Jonathan Lange <jml@mumak.net> | 2012-09-19 11:17:36 +0100 |
|---|---|---|
| committer | Jonathan Lange <jml@mumak.net> | 2012-09-19 11:17:36 +0100 |
| commit | 4101a8afebca1c3b1d9a746bc9493190304f3f98 (patch) | |
| tree | 98da18d8b1823d67dd31c8c242ac32b7314ca76b | |
| parent | a5fb3f128ddd742a4e8b9b050fb590243cca43af (diff) | |
| download | python-setuptools-bitbucket-4101a8afebca1c3b1d9a746bc9493190304f3f98.tar.gz | |
Guard the chmod in case external_attr is 0.
| -rwxr-xr-x | setuptools/archive_util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 8ad14752..e22b25c0 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -158,7 +158,9 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): finally: f.close() del data - os.chmod(target, info.external_attr >> 16) + unix_attributes = info.external_attr >> 16 + if unix_attributes: + os.chmod(target, unix_attributes) finally: z.close() |
