diff --git a/package_control/package_manager.py b/package_control/package_manager.py index 9d3ef76d..731a7a32 100644 --- a/package_control/package_manager.py +++ b/package_control/package_manager.py @@ -1053,7 +1053,10 @@ def _extract_zip(self, name, zf, src_dir, dest_dir, extracted_files=None): with zf.open(info) as fsrc, open(dest, 'wb') as fdst: shutil.copyfileobj(fsrc, fdst) - except IOError as e: + # restore file mode + os.chmod(dest, info.external_attr >> 16) + + except OSError as e: if e.errno == 5 or e.errno == 13: # permission denied return True