Now that we use workdir() in make_image(), we have to change the
Partition initializer to remove the path added by workdir() again
to get the proper path on the host.
Fixes #3242.
type=dict["type"],
uuid=dict["uuid"],
partno=int(partno) if (partno := dict.get("partno")) else None,
- split_path=Path(p) if ((p := dict.get("split_path")) and p != "-") else None,
+ # We have to translate the sandbox path to the path on the host by removing the /work prefix.
+ split_path=(
+ Path(p.removeprefix("/work")) if ((p := dict.get("split_path")) and p != "-") else None
+ ),
roothash=dict.get("roothash"),
)