Skip to content

Commit 893f271

Browse files
committed
Skip circular symlinks (and other possible failures from fs::exists) and continue parsing.
1 parent e3f32a6 commit 893f271

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

util/src/parserutil.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,17 @@ bool iterateDirectoryRecursive(
5050

5151
fs::path p(path_);
5252

53-
if (!fs::exists(p))
53+
try
5454
{
55-
LOG(warning) << "Not found: " << p;
55+
if (!fs::exists(p))
56+
{
57+
LOG(warning) << "Not found: " << p;
58+
return true;
59+
}
60+
}
61+
catch (const std::exception& ex_)
62+
{
63+
LOG(warning) << "Parser threw an exception: " << ex_.what();
5664
return true;
5765
}
5866

0 commit comments

Comments
 (0)