pathlib.Path('foo').joinpath('/bar/baz')
will silently do nothing and return
/bar/baz and not foo/bar/baz because the second path is absolute...🤔
pathlib.Path('foo').joinpath('/bar/baz')
will silently do nothing and return
/bar/baz and not foo/bar/baz because the second path is absolute...🤔
You're right,
@pr_ret_lutz
And that seems fair, as there's no way to add to a path that's absolute.
Maybe
pathlib.Path('/foo').joinpath('./bar/baz')
will do what you want.
@hgfernan I did
path1/str(path2)[1:]
Indeed, @pr_ret_lutz, it's far more easier using strings
Using pathlib is nice too.
🙃