mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
FileManager: Display message box if stat()'ing a file to activate fails
This commit is contained in:
parent
569a035786
commit
b409d3cf88
1 changed files with 2 additions and 0 deletions
|
@ -102,6 +102,8 @@ void DirectoryView::handle_activation(GUI::ModelIndex const& index)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (stat(path.characters(), &st) < 0) {
|
if (stat(path.characters(), &st) < 0) {
|
||||||
perror("stat");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue