(self, to_path, name)
| 143 | return True |
| 144 | |
| 145 | def target_filename(self, to_path, name): |
| 146 | target_path = os.path.abspath(to_path) |
| 147 | filename = os.path.abspath(os.path.join(target_path, name)) |
| 148 | try: |
| 149 | if os.path.commonpath([target_path, filename]) != target_path: |
| 150 | raise SuspiciousOperation("Archive contains invalid path: '%s'" % name) |
| 151 | except ValueError: |
| 152 | # Different drives on Windows raises ValueError. |
| 153 | raise SuspiciousOperation("Archive contains invalid path: '%s'" % name) |
| 154 | return filename |
| 155 | |
| 156 | def extract(self): |
| 157 | raise NotImplementedError( |
no test coverage detected