mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
lstat() cleanup
This commit is contained in:
parent
688bd4fb50
commit
236d9ee7f7
8 changed files with 15 additions and 46 deletions
|
@ -614,8 +614,7 @@ Path resolveExprPath(Path path)
|
|||
// Basic cycle/depth limit to avoid infinite loops.
|
||||
if (++followCount >= maxFollow)
|
||||
throw Error("too many symbolic links encountered while traversing the path '%s'", path);
|
||||
if (lstat(path.c_str(), &st))
|
||||
throw SysError("getting status of '%s'", path);
|
||||
st = lstat(path);
|
||||
if (!S_ISLNK(st.st_mode)) break;
|
||||
path = absPath(readLink(path), dirOf(path));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue