mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
* Ignore dangling symlinks in ~/.nix-defexpr.
This commit is contained in:
parent
f3441e6122
commit
27f57c9018
1 changed files with 6 additions and 1 deletions
|
@ -116,9 +116,14 @@ static void getAllExprs(EvalState & state,
|
|||
|
||||
for (Strings::iterator i = names.begin(); i != names.end(); ++i) {
|
||||
Path path2 = path + "/" + *i;
|
||||
|
||||
struct stat st;
|
||||
if (stat(path2.c_str(), &st) == -1)
|
||||
continue; // ignore dangling symlinks in ~/.nix-defexpr
|
||||
|
||||
if (isNixExpr(path2))
|
||||
attrs.set(toATerm(*i), makeAttrRHS(
|
||||
parseExprFromFile(state, absPath(path2)), makeNoPos()));
|
||||
parseExprFromFile(state, absPath(path2)), makeNoPos()));
|
||||
else
|
||||
getAllExprs(state, path2, attrs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue