aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies/resolve-system-dependencies.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve-system-dependencies/resolve-system-dependencies.cc')
-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)