Skip to content

Commit 77dad57

Browse files
committed
Nits 2
1 parent fa0bf8a commit 77dad57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ static std::filesystem::path normalizePath(const std::filesystem::path path)
137137

138138
std::string Config::matchFilenameFromCompileCommand()
139139
{
140+
if (m_projectFilePath.empty() || m_projectFilePath.extension() != ".json")
141+
return "";
142+
140143
// Read compile_commands file
141144
std::ifstream ifs(m_projectFilePath);
142145
if (ifs.fail())

0 commit comments

Comments
 (0)