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:
parent
b41b6dd279
commit
2a6a54dea5
6 changed files with 14 additions and 24 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue