mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
lstat() cleanup
This commit is contained in:
parent
688bd4fb50
commit
236d9ee7f7
8 changed files with 15 additions and 46 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue