1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

Factor out the Unix-specific parts of canonPathInner

This prepares the code to also support Windows paths in the next commit.
This commit is contained in:
John Ericson 2024-01-29 17:16:18 -05:00
parent 60936f28e5
commit 4531585275
3 changed files with 45 additions and 11 deletions

View file

@ -78,7 +78,7 @@ Path canonPath(PathView path, bool resolveSymlinks)
arbitrary (but high) limit to prevent infinite loops. */
unsigned int followCount = 0, maxFollow = 1024;
return canonPathInner(
return canonPathInner<UnixPathTrait>(
path,
[&followCount, &temp, maxFollow, resolveSymlinks]
(std::string & result, std::string_view & remaining) {