summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipmid-new.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index a6a5caa..5741842 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -415,7 +415,13 @@ std::forward_list<IpmiProvider> loadProviders(const fs::path& ipmiLibsPath)
std::vector<fs::path> libs;
for (const auto& libPath : fs::directory_iterator(ipmiLibsPath))
{
+ std::error_code ec;
fs::path fname = libPath.path();
+ if (fs::is_symlink(fname, ec) || ec)
+ {
+ // it's a symlink or some other error; skip it
+ continue;
+ }
while (fname.has_extension())
{
fs::path extn = fname.extension();
OpenPOWER on IntegriCloud