mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
AK: Add a canonicalized_path() convenience function.
This is the same as calling FileSystemPath(foo).string(). The majority of clients only care about canonicalizing a path, so let's have an easy way to express that.
This commit is contained in:
parent
cd497accbe
commit
954a0b8efe
7 changed files with 33 additions and 25 deletions
|
@ -108,7 +108,7 @@ RefPtr<GraphicsBitmap> load_png(const StringView& path)
|
|||
return nullptr;
|
||||
auto bitmap = load_png_impl((const u8*)mapped_file.pointer(), mapped_file.size());
|
||||
if (bitmap)
|
||||
bitmap->set_mmap_name(String::format("GraphicsBitmap [%dx%d] - Decoded PNG: %s", bitmap->width(), bitmap->height(), FileSystemPath(path).string().characters()));
|
||||
bitmap->set_mmap_name(String::format("GraphicsBitmap [%dx%d] - Decoded PNG: %s", bitmap->width(), bitmap->height(), canonicalized_path(path).characters()));
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue