mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 14:10:59 +01:00
Improve symlink handling
This commit is contained in:
parent
2a53574675
commit
df2aa29690
7 changed files with 51 additions and 22 deletions
|
|
@ -119,7 +119,7 @@ static void getAllExprs(EvalState & state,
|
|||
|
||||
InputAccessor::Stat st;
|
||||
try {
|
||||
st = path2.accessor.lstat(path2.path.resolveSymlinks());
|
||||
st = path2.resolveSymlinks().lstat();
|
||||
} catch (Error &) {
|
||||
continue; // ignore dangling symlinks in ~/.nix-defexpr
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ static void getAllExprs(EvalState & state,
|
|||
|
||||
static void loadSourceExpr(EvalState & state, const SourcePath & path, Value & v)
|
||||
{
|
||||
auto st = path.accessor.lstat(path.path.resolveSymlinks());
|
||||
auto st = path.resolveSymlinks().lstat();
|
||||
|
||||
if (isNixExpr(path, st))
|
||||
state.evalFile(path, v);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue