mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibCore+Everywhere: Return an Error from DirIterator::error()
This also removes DirIterator::error_string(), since the same strerror() string will be included when you print the Error itself. Except in `ls` which is still using fprintf() for now.
This commit is contained in:
parent
a98ae8f357
commit
774f328783
17 changed files with 44 additions and 46 deletions
|
@ -129,8 +129,8 @@ static ErrorOr<void> mount_all()
|
|||
|
||||
auto fstab_directory_iterator = Core::DirIterator("/etc/fstab.d", Core::DirIterator::SkipDots);
|
||||
|
||||
if (fstab_directory_iterator.has_error() && fstab_directory_iterator.error() != ENOENT) {
|
||||
dbgln("Failed to open /etc/fstab.d: {}", fstab_directory_iterator.error_string());
|
||||
if (fstab_directory_iterator.has_error() && fstab_directory_iterator.error().code() != ENOENT) {
|
||||
dbgln("Failed to open /etc/fstab.d: {}", fstab_directory_iterator.error());
|
||||
} else if (!fstab_directory_iterator.has_error()) {
|
||||
while (fstab_directory_iterator.has_next()) {
|
||||
auto path = fstab_directory_iterator.next_full_path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue