From 7b62113db7f477b35545c5a6d7e2f0d2d7362551 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 26 Aug 2021 23:40:58 +0200 Subject: [PATCH] FileManager: Report errors from chdir(), if any --- Userland/Applications/FileManager/DirectoryView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/FileManager/DirectoryView.cpp b/Userland/Applications/FileManager/DirectoryView.cpp index 25dab439b2..06ad29f3cd 100644 --- a/Userland/Applications/FileManager/DirectoryView.cpp +++ b/Userland/Applications/FileManager/DirectoryView.cpp @@ -390,7 +390,9 @@ bool DirectoryView::open(String const& path) if (real_path.is_null() || !Core::File::is_directory(path)) return false; - chdir(real_path.characters()); + if (chdir(real_path.characters()) < 0) { + perror("chdir"); + } if (model().root_path() == real_path) { refresh(); } else {