AK: Make LexicalPath::relative_path() fallible

This commit is contained in:
stasoid 2024-10-22 22:53:25 +05:00 committed by Andrew Kaster
commit 31bf40b659
Notes: github-actions[bot] 2024-11-09 19:43:30 +00:00
8 changed files with 12 additions and 14 deletions

View file

@ -295,7 +295,7 @@ static void generate_include_for(auto& generator, auto& path)
for (auto& search_path : g_header_search_paths) {
if (!path.starts_with(search_path))
continue;
auto relative_path = LexicalPath::relative_path(path, search_path);
auto relative_path = *LexicalPath::relative_path(path, search_path);
if (relative_path.length() < path_string.length())
path_string = relative_path;
}