mirror of
https://github.com/NixOS/nix
synced 2025-06-30 15:48:00 +02:00
Improve symlink handling
This commit is contained in:
parent
2a53574675
commit
df2aa29690
7 changed files with 51 additions and 22 deletions
|
@ -1376,7 +1376,8 @@ static void prim_storePath(EvalState & state, const PosIdx pos, Value * * args,
|
|||
/* Resolve symlinks in ‘path’, unless ‘path’ itself is a symlink
|
||||
directly in the store. The latter condition is necessary so
|
||||
e.g. nix-push does the right thing. */
|
||||
if (!state.store->isStorePath(path.abs())) path = path.resolveSymlinks();
|
||||
if (!state.store->isStorePath(path.abs()))
|
||||
path = CanonPath(canonPath(path.abs(), true));
|
||||
if (!state.store->isInStore(path.abs()))
|
||||
throw EvalError({
|
||||
.msg = hintfmt("path '%1%' is not in the Nix store", path),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue