diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-05-26 14:52:44 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-26 14:35:10 +0200 |
commit | 602c3fdb3a0975418886e32cf9cc53b45d2f8964 (patch) | |
tree | 079b3ebdaf7db517625496e35acf1158adacad77 /Libraries/LibC/dlfcn.cpp | |
parent | f746bbda174d914d5de9379084a6fb2095c58d68 (diff) | |
download | serenity-602c3fdb3a0975418886e32cf9cc53b45d2f8964.zip |
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.
Diffstat (limited to 'Libraries/LibC/dlfcn.cpp')
-rw-r--r-- | Libraries/LibC/dlfcn.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibC/dlfcn.cpp b/Libraries/LibC/dlfcn.cpp index d6be5d8867..eaa3c5f7df 100644 --- a/Libraries/LibC/dlfcn.cpp +++ b/Libraries/LibC/dlfcn.cpp @@ -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) |