mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath. This is to make it clear that FileSystemPath/canonicalized_path() only perform *lexical* canonicalization.
This commit is contained in:
parent
f746bbda17
commit
602c3fdb3a
44 changed files with 174 additions and 181 deletions
|
@ -32,7 +32,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
|
@ -70,9 +70,9 @@ void* dlopen(const char* filename, int flags)
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
FileSystemPath file_path(filename);
|
||||
auto basename = LexicalPath(filename).basename();
|
||||
|
||||
auto existing_elf_object = g_elf_objects.get(file_path.basename());
|
||||
auto existing_elf_object = g_elf_objects.get(basename);
|
||||
if (existing_elf_object.has_value()) {
|
||||
return const_cast<ELF::DynamicLoader*>(existing_elf_object.value());
|
||||
}
|
||||
|
@ -105,11 +105,11 @@ void* dlopen(const char* filename, int flags)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
g_elf_objects.set(file_path.basename(), move(loader));
|
||||
g_elf_objects.set(basename, move(loader));
|
||||
g_dlerror_msg = "Successfully loaded ELF object.";
|
||||
|
||||
// we have one refcount already
|
||||
return const_cast<ELF::DynamicLoader*>(g_elf_objects.get(file_path.basename()).value());
|
||||
return const_cast<ELF::DynamicLoader*>(g_elf_objects.get(basename).value());
|
||||
}
|
||||
|
||||
void* dlsym(void* handle, const char* symbol_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue