mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
Everywhere: Move shared library checks into a common function
While we're at it, unify the various different conditions that are scattered accross the codebase.
This commit is contained in:
committed by
Andreas Kling
parent
31c634be5a
commit
80cb44afae
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "Process.h"
|
||||
#include <LibCore/File.h>
|
||||
|
||||
namespace Profiler {
|
||||
|
||||
@@ -90,7 +91,7 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, const String& name)
|
||||
} else {
|
||||
String path_string = path.to_string();
|
||||
String full_path;
|
||||
if (path_string.ends_with(".so"sv))
|
||||
if (Core::File::looks_like_shared_library(path_string))
|
||||
full_path = String::formatted("/usr/lib/{}", path);
|
||||
else
|
||||
full_path = path_string;
|
||||
|
||||
Reference in New Issue
Block a user