1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

Merge pull request #12667 from NixOS/in-dir-cleanup

Cleanup `isInDir` and  `isDirOrInDir`
This commit is contained in:
John Ericson 2025-03-19 18:01:59 -04:00 committed by GitHub
commit 3d333e0aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 18 deletions

View file

@ -1046,7 +1046,7 @@ void LocalDerivationGoal::startBuilder()
/* If only we had a trie to do this more efficiently :) luckily, these are generally going to be pretty small */
for (auto & a : allowedPaths) {
Path canonA = canonPath(a);
if (canonI == canonA || isInDir(canonI, canonA)) {
if (isDirOrInDir(canonI, canonA)) {
found = true;
break;
}