1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

Userland: Use Core::DirIterator::next_full_path()

Simplify some code by using this instead of concatenating the full path
ourselves at the call site.
This commit is contained in:
Andreas Kling 2021-04-21 22:16:32 +02:00
parent b41b6dd279
commit 2a6a54dea5
6 changed files with 14 additions and 24 deletions

View file

@ -142,7 +142,7 @@ static HashMap<String, String>& man_paths()
// FIXME: This should also search man3, possibly other places..
Core::DirIterator it("/usr/share/man/man2", Core::DirIterator::Flags::SkipDots);
while (it.has_next()) {
auto path = String::formatted("/usr/share/man/man2/{}", it.next_path());
auto path = it.next_full_path();
auto title = LexicalPath(path).title();
paths.set(title, path);
}