When switching from py.path.local to pathlib (70f3ad1c1f), `local.parts(reverse=True)` was translated incorrectly, leading to the wrong rootdir being determined in some non-trivial cases where parent directories have config files as well.
70f3ad1c1f