Process a builtin type or an unknown type which will be treated as a regular file.
(self, tarfile)
| 1392 | return self._proc_builtin(tarfile) |
| 1393 | |
| 1394 | def _proc_builtin(self, tarfile): |
| 1395 | """Process a builtin type or an unknown type which |
| 1396 | will be treated as a regular file. |
| 1397 | """ |
| 1398 | self.offset_data = tarfile.fileobj.tell() |
| 1399 | offset = self.offset_data |
| 1400 | if self.isreg() or self.type not in SUPPORTED_TYPES: |
| 1401 | # Skip the following data blocks. |
| 1402 | offset += self._block(self.size) |
| 1403 | tarfile.offset = offset |
| 1404 | |
| 1405 | # Patch the TarInfo object with saved global |
| 1406 | # header information. |
| 1407 | self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors) |
| 1408 | |
| 1409 | # Remove redundant slashes from directories. This is to be consistent |
| 1410 | # with frombuf(). |
| 1411 | if self.isdir(): |
| 1412 | self.name = self.name.rstrip("/") |
| 1413 | |
| 1414 | return self |
| 1415 | |
| 1416 | def _proc_gnulong(self, tarfile): |
| 1417 | """Process the blocks that hold a GNU longname |
no test coverage detected