1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

lstat() cleanup

This commit is contained in:
Eelco Dolstra 2020-09-23 19:17:28 +02:00
parent 688bd4fb50
commit 236d9ee7f7
8 changed files with 15 additions and 46 deletions

View file

@ -111,11 +111,7 @@ std::set<std::string> runResolver(const Path & filename)
bool isSymlink(const Path & path)
{
struct stat st;
if (lstat(path.c_str(), &st) == -1)
throw SysError("getting attributes of path '%1%'", path);
return S_ISLNK(st.st_mode);
return S_ISLNK(lstat(path).st_mode);
}
Path resolveSymlink(const Path & path)