with TemporaryDirectory(dir=local.parent, prefix=".") as tempdir:
log.debug("Created: %s", tempdir)
log.debug("Moving: %s -> %s", parts, tempdir)
move(parts, tempdir)
extract_tarfile(Path(tempdir, archive), Path(tempdir))
steamrt, *_ = archive.split(".tar.xz")
log.debug("Exchanging: %s <-> %s", Path(tempdir, steamrt), local)
exchange(Path(tempdir, steamrt), local)
with TemporaryDirectory(dir=local.parent, prefix=".") as tempdir:
log.debug("Created: %s", tempdir)
log.debug("Moving: %s -> %s", parts, tempdir)
move(parts, tempdir)
extract_tarfile(Path(tempdir, archive), Path(tempdir))
steamrt, *_ = archive.split(".tar.xz")
log.debug("Exchanging: %s <-> %s", Path(tempdir, steamrt), local)
exchange(Path(tempdir, steamrt), local)