mirror of
https://github.com/NixOS/nix
synced 2025-06-29 14:53:16 +02:00
Fix handling of relative paths
In particular, 'path:..' got turned into 'path:.' because isRelative() returned a CanonPath, which cannot represent '..'. Reported by @erikarvstedt.
This commit is contained in:
parent
7317196807
commit
511590976c
5 changed files with 7 additions and 6 deletions
|
@ -434,7 +434,7 @@ LockedFlake lockFlake(
|
|||
if (auto relativePath = input.ref->input.isRelative()) {
|
||||
SourcePath inputSourcePath {
|
||||
overridenSourcePath.accessor,
|
||||
*overridenSourcePath.path.parent() + *relativePath
|
||||
CanonPath(*relativePath, *overridenSourcePath.path.parent())
|
||||
};
|
||||
return readFlake(state, *input.ref, *input.ref, *input.ref, inputSourcePath, inputPath);
|
||||
} else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue