MCPcopy Create free account
hub / github.com/WebAssembly/wasi-testsuite / _normalize_input

Function _normalize_input

tools/package_dist.py:29–39  ·  view source on GitHub ↗
(info: tarfile.TarInfo)

Source from the content-addressed store, hash-verified

27
28
29def _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
42def _add_path(tar: tarfile.TarFile, src: Path, arcname: str) -> None:

Callers

nothing calls this directly

Calls 1

_reset_metadataFunction · 0.85

Tested by

no test coverage detected