(info: tarfile.TarInfo)
| 27 | |
| 28 | |
| 29 | def _normalize_input(info: tarfile.TarInfo) -> tarfile.TarInfo: |
| 30 | _reset_metadata(info) |
| 31 | if info.isdir(): |
| 32 | info.mode = 0o755 |
| 33 | elif info.issym(): |
| 34 | info.mode = 0o777 |
| 35 | elif info.isfile(): |
| 36 | info.mode = stat.S_IMODE(info.mode) |
| 37 | else: |
| 38 | raise FileNotFoundError(info.name) |
| 39 | return info |
| 40 | |
| 41 | |
| 42 | def _add_path(tar: tarfile.TarFile, src: Path, arcname: str) -> None: |
nothing calls this directly
no test coverage detected