If the file in the archive has some permissions (this assumes a file won't be writable/executable without being readable), apply those permissions to the unarchived file.
(mode, filename)
| 106 | |
| 107 | @staticmethod |
| 108 | def _copy_permissions(mode, filename): |
| 109 | """ |
| 110 | If the file in the archive has some permissions (this assumes a file |
| 111 | won't be writable/executable without being readable), apply those |
| 112 | permissions to the unarchived file. |
| 113 | """ |
| 114 | if mode & stat.S_IROTH: |
| 115 | os.chmod(filename, mode) |
| 116 | |
| 117 | def split_leading_dir(self, path): |
| 118 | path = str(path) |