1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:27:43 +00:00

LanguageServers/FileDB: Allow m_project_root to be null

This commit is contained in:
Itamar 2021-05-14 09:38:57 +03:00 committed by Andreas Kling
parent c49cf23a86
commit 545b6af305

View file

@ -67,7 +67,8 @@ String FileDB::to_absolute_path(const String& filename) const
if (LexicalPath { filename }.is_absolute()) { if (LexicalPath { filename }.is_absolute()) {
return filename; return filename;
} }
VERIFY(!m_project_root.is_null()); if (m_project_root.is_null())
return filename;
return LexicalPath { String::formatted("{}/{}", m_project_root, filename) }.string(); return LexicalPath { String::formatted("{}/{}", m_project_root, filename) }.string();
} }