LibDebug: Identify embedded resources with a preceding dot

This commit is contained in:
Tim Schumacher 2023-01-12 14:35:31 +01:00 committed by Jelle Raaijmakers
parent edd4913573
commit e65767c2e7
Notes: sideshowbarker 2024-07-17 06:33:00 +09:00

View file

@ -308,7 +308,13 @@ LineProgram::DirectoryAndFile LineProgram::get_directory_and_file(size_t file_in
bool LineProgram::looks_like_embedded_resource() const
{
return source_files().size() == 1 && source_files()[0].name.view().contains("serenity_icon_"sv);
if (source_files().size() == 1)
return source_files()[0].name.view().contains("serenity_icon_"sv);
if (source_files().size() == 2 && source_files()[0].name.view() == "."sv)
return source_files()[1].name.view().contains("serenity_icon_"sv);
return false;
}
}