mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
FileManager: Report errors from chdir(), if any
This commit is contained in:
parent
83d3720842
commit
7b62113db7
1 changed files with 3 additions and 1 deletions
|
@ -390,7 +390,9 @@ bool DirectoryView::open(String const& path)
|
||||||
if (real_path.is_null() || !Core::File::is_directory(path))
|
if (real_path.is_null() || !Core::File::is_directory(path))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
chdir(real_path.characters());
|
if (chdir(real_path.characters()) < 0) {
|
||||||
|
perror("chdir");
|
||||||
|
}
|
||||||
if (model().root_path() == real_path) {
|
if (model().root_path() == real_path) {
|
||||||
refresh();
|
refresh();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue