I have a pathlib.Path('/etc').
If I need to prefix it with pathlib.Path('/mnt/chroot') and do something like:
Path('/mnt/chroot') / Path('/etc')
I just end up with: PosixPath('/etc'), presumably because both Path's are absolute paths, and can't be concatenated.
I can hack together a solution with something like:
Path('/mnt/chroot') / str(Path('/etc')).removeprefix('/')
But that is long-winded, and hackish. Is there a simpler, proper way to do this?