mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
FileManager: Restore inline message behavior for inaccessible dirs
Print the correct error from Core::System::chdir() instead of errno, and
display the error in the DirectoryView instead of continuing to show the
previous location's contents.
This regressed in 1dc3ba6ed5
.
This commit is contained in:
parent
477a96820d
commit
6d02403e06
1 changed files with 3 additions and 3 deletions
|
@ -408,9 +408,9 @@ bool DirectoryView::open(DeprecatedString const& path)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
auto real_path = error_or_real_path.release_value();
|
auto real_path = error_or_real_path.release_value();
|
||||||
if (Core::System::chdir(real_path).is_error()) {
|
if (auto result = Core::System::chdir(real_path); result.is_error()) {
|
||||||
perror("chdir");
|
dbgln("Failed to open '{}': {}", real_path, result.error());
|
||||||
return false;
|
warnln("Failed to open '{}': {}", real_path, result.error());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model().root_path() == real_path.to_deprecated_string()) {
|
if (model().root_path() == real_path.to_deprecated_string()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue