1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

Use isAbsolute()

(cherry picked from commit ff9d886f3c)
This commit is contained in:
Eelco Dolstra 2025-01-14 17:42:26 +01:00 committed by Mergify
parent 0b57e7daf5
commit 639f526405
7 changed files with 12 additions and 12 deletions

View file

@ -396,7 +396,7 @@ void EvalState::checkURI(const std::string & uri)
/* If the URI is a path, then check it against allowedPaths as
well. */
if (hasPrefix(uri, "/")) {
if (isAbsolute(uri)) {
if (auto rootFS2 = rootFS.dynamic_pointer_cast<AllowListSourceAccessor>())
rootFS2->checkAccess(CanonPath(uri));
return;