aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-23 19:17:28 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-09-23 19:17:28 +0200
commit236d9ee7f72ca4238f5f44c244fd2b885691c6ad (patch)
treef5dc04851c9788ac7bb8802787a3eae7857eadf5 /src/resolve-system-dependencies
parent688bd4fb500c70cda4ffe6864bbf59dbc4da49a2 (diff)
lstat() cleanup
Diffstat (limited to 'src/resolve-system-dependencies')
-rw-r--r--src/resolve-system-dependencies/resolve-system-dependencies.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc
index 434ad80a6..d30227e4e 100644
--- a/src/resolve-system-dependencies/resolve-system-dependencies.cc
+++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc
@@ -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)