diff --git a/src/libfetchers/input-accessor.cc b/src/libfetchers/input-accessor.cc index 2391124e2..4555a9d9c 100644 --- a/src/libfetchers/input-accessor.cc +++ b/src/libfetchers/input-accessor.cc @@ -118,7 +118,7 @@ struct FSInputAccessorImpl : FSInputAccessor , allowedPaths(std::move(allowedPaths)) , makeNotAllowedError(std::move(makeNotAllowedError)) { - displayPrefix = root.abs(); + displayPrefix = root.isRoot() ? "" : root.abs(); } std::string readFile(const CanonPath & path) override