Process a builtin type or an unknown type which will be treated as a regular file.
(self, tarfile)
| 1320 | return self._proc_builtin(tarfile) |
| 1321 | |
| 1322 | def _proc_builtin(self, tarfile): |
| 1323 | """Process a builtin type or an unknown type which |
| 1324 | will be treated as a regular file. |
| 1325 | """ |
| 1326 | self.offset_data = tarfile.fileobj.tell() |
| 1327 | offset = self.offset_data |
| 1328 | if self.isreg() or self.type not in SUPPORTED_TYPES: |
| 1329 | # Skip the following data blocks. |
| 1330 | offset += self._block(self.size) |
| 1331 | tarfile.offset = offset |
| 1332 | |
| 1333 | # Patch the TarInfo object with saved global |
| 1334 | # header information. |
| 1335 | self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors) |
| 1336 | |
| 1337 | # Remove redundant slashes from directories. This is to be consistent |
| 1338 | # with frombuf(). |
| 1339 | if self.isdir(): |
| 1340 | self.name = self.name.rstrip("/") |
| 1341 | |
| 1342 | return self |
| 1343 | |
| 1344 | def _proc_gnulong(self, tarfile): |
| 1345 | """Process the blocks that hold a GNU longname |
no test coverage detected