summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-05-14 09:38:57 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-14 13:27:47 +0200
commit545b6af3059cc463d27631b729bb6389cfa53c80 (patch)
treefdb182b5416c7988a4f8c933708bfbf799a29d12 /Userland
parentc49cf23a862cc9564ffaebc8e4dd1c6ef5506bc1 (diff)
downloadserenity-545b6af3059cc463d27631b729bb6389cfa53c80.zip
LanguageServers/FileDB: Allow m_project_root to be null
Diffstat (limited to 'Userland')
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/FileDB.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/FileDB.cpp b/Userland/DevTools/HackStudio/LanguageServers/FileDB.cpp
index a7afa83ce0..73f74d7d0c 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/FileDB.cpp
+++ b/Userland/DevTools/HackStudio/LanguageServers/FileDB.cpp
@@ -67,7 +67,8 @@ String FileDB::to_absolute_path(const String& filename) const
if (LexicalPath { filename }.is_absolute()) {
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();
}