mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-22 21:37:22 +00:00
FileManager: Display message box if stat()'ing a file to activate fails
This commit is contained in:
@@ -102,6 +102,8 @@ void DirectoryView::handle_activation(GUI::ModelIndex const& index)
|
||||
struct stat st;
|
||||
if (stat(path.characters(), &st) < 0) {
|
||||
perror("stat");
|
||||
auto error_message = DeprecatedString::formatted("Could not stat {}: {}", path, strerror(errno));
|
||||
GUI::MessageBox::show(window(), error_message, "File Manager"sv, GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user