From 8f474399f578d5f88bdca5ba8e9455ffa122ed58 Mon Sep 17 00:00:00 2001 From: "Commentator2.0" Date: Sun, 28 Dec 2025 13:25:47 +0100 Subject: [PATCH] tests/functional2/nix: only convert path to physical if it isn't already Change-Id: I88e5079ef01872302aade365444d9b028088ff95 --- tests/functional2/testlib/fixtures/nix.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/functional2/testlib/fixtures/nix.py b/tests/functional2/testlib/fixtures/nix.py index 8fb3128e5..c12e56a36 100644 --- a/tests/functional2/testlib/fixtures/nix.py +++ b/tests/functional2/testlib/fixtures/nix.py @@ -269,7 +269,11 @@ class Nix: :param path: a string or Path to convert :return: a Path object holding the rewritten, physical system path to the store entry """ - return Path(str(path).replace("/nix/store", self.store_dir.as_posix())) + return ( + Path(str(path).replace("/nix/store", self.store_dir.as_posix())) + if str(path).startswith("/nix/store") + else Path(path) + ) def hash_path(self, store_path: str | Path, *args: str) -> str: """