mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +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
|
@ -55,10 +55,10 @@ static String get_child_path_from_inode_index(const String& path, unsigned child
|
|||
}
|
||||
|
||||
while (iterator.has_next()) {
|
||||
auto child_full_path = String::formatted("{}/{}", path, iterator.next_path());
|
||||
struct stat st;
|
||||
auto child_full_path = iterator.next_full_path();
|
||||
|
||||
if (lstat(child_full_path.characters(), &st)) {
|
||||
struct stat st = {};
|
||||
if (lstat(child_full_path.characters(), &st) < 0) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue