Process a builtin type or an unknown type which will be treated as a regular file.
(self, tarfile)
| 1373 | return self._proc_builtin(tarfile) |
| 1374 | |
| 1375 | def _proc_builtin(self, tarfile): |
| 1376 | """Process a builtin type or an unknown type which |
| 1377 | will be treated as a regular file. |
| 1378 | """ |
| 1379 | self.offset_data = tarfile.fileobj.tell() |
| 1380 | offset = self.offset_data |
| 1381 | if self.isreg() or self.type not in SUPPORTED_TYPES: |
| 1382 | # Skip the following data blocks. |
| 1383 | offset += self._block(self.size) |
| 1384 | tarfile.offset = offset |
| 1385 | |
| 1386 | # Patch the TarInfo object with saved global |
| 1387 | # header information. |
| 1388 | self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors) |
| 1389 | |
| 1390 | # Remove redundant slashes from directories. This is to be consistent |
| 1391 | # with frombuf(). |
| 1392 | if self.isdir(): |
| 1393 | self.name = self.name.rstrip("/") |
| 1394 | |
| 1395 | return self |
| 1396 | |
| 1397 | def _proc_gnulong(self, tarfile): |
| 1398 | """Process the blocks that hold a GNU longname |
no test coverage detected