api: controller: Fix pb2_path_to_pathlib_path() chroot assumptions

It's not valid to do path concatenation or subtraction using
chroot.path. Use chroot_lib instead.

BUG=b:265885353
TEST=./run_tests

Change-Id: I1f5be1b97a16bdb0f91ee66b0e657aa71c9c501d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4661950
Reviewed-by: Greg Edelston <gredelston@google.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
diff --git a/api/controller/controller_util.py b/api/controller/controller_util.py
index 054838a..04a6f5e 100644
--- a/api/controller/controller_util.py
+++ b/api/controller/controller_util.py
@@ -317,5 +317,4 @@
         return Path(pb2_path.path)
     if chroot is None:
         raise ValueError("Cannot convert inside path without a chroot.")
-    path_relative_to_root = pb2_path.path[1:]
-    return Path(chroot.path, path_relative_to_root)
+    return Path(ParseChroot(chroot).full_path(pb2_path.path))