mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +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
|
@ -171,8 +171,7 @@ void DevicesModel::update()
|
|||
auto fill_in_paths_from_dir = [this](const String& dir) {
|
||||
Core::DirIterator dir_iter { dir, Core::DirIterator::Flags::SkipDots };
|
||||
while (dir_iter.has_next()) {
|
||||
auto name = dir_iter.next_path();
|
||||
auto path = String::formatted("{}/{}", dir, name);
|
||||
auto path = dir_iter.next_full_path();
|
||||
struct stat statbuf;
|
||||
if (lstat(path.characters(), &statbuf) != 0) {
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue