1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

LibCore+AK: Move MappedFile from AK to LibCore

MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
This commit is contained in:
Andreas Kling 2021-11-23 11:32:25 +01:00
parent c1c9da6c35
commit 58fb3ebf66
48 changed files with 101 additions and 103 deletions

View file

@ -5,10 +5,10 @@
*/
#include <AK/LexicalPath.h>
#include <AK/MappedFile.h>
#include <AK/String.h>
#include <LibCore/ConfigFile.h>
#include <LibCore/File.h>
#include <LibCore/MappedFile.h>
#include <LibCore/StandardPaths.h>
#include <LibELF/Image.h>
#include <LibGUI/FileIconProvider.h>
@ -147,7 +147,7 @@ Icon FileIconProvider::icon_for_executable(const String& path)
// If the icon for an app isn't in the cache we attempt to load the file as an ELF image and extract
// the serenity_app_icon_* sections which should contain the icons as raw PNG data. In the future it would
// be better if the binary signalled the image format being used or we deduced it, e.g. using magic bytes.
auto file_or_error = MappedFile::map(path);
auto file_or_error = Core::MappedFile::map(path);
if (file_or_error.is_error()) {
app_icon_cache.set(path, s_executable_icon);
return s_executable_icon;