We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc7deb commit c8074d2Copy full SHA for c8074d2
libsolidity/lsp/LanguageServer.cpp
@@ -58,14 +58,15 @@ namespace fs = boost::filesystem;
58
namespace
59
{
60
61
-bool resolvesToRegularFile(boost::filesystem::path _path)
+bool resolvesToRegularFile(boost::filesystem::path _path, int maxRecursionDepth = 10)
62
63
fs::file_status fileStatus = fs::status(_path);
64
65
- while (fileStatus.type() == fs::file_type::symlink_file)
+ while (fileStatus.type() == fs::file_type::symlink_file && maxRecursionDepth > 0)
66
67
_path = boost::filesystem::read_symlink(_path);
68
fileStatus = fs::status(_path);
69
+ maxRecursionDepth--;
70
}
71
72
return fileStatus.type() == fs::file_type::regular_file;
0 commit comments