mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
FileManager: Don't crash when clicking on a forbidden directory.
This commit is contained in:
parent
d77f8ba413
commit
51a3f20445
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,10 @@ void DirectoryView::open(const String& path)
|
||||||
{
|
{
|
||||||
if (m_path == path)
|
if (m_path == path)
|
||||||
return;
|
return;
|
||||||
|
DIR* dirp = opendir(path.characters());
|
||||||
|
if (!dirp)
|
||||||
|
return;
|
||||||
|
closedir(dirp);
|
||||||
m_path = path;
|
m_path = path;
|
||||||
reload();
|
reload();
|
||||||
if (on_path_change)
|
if (on_path_change)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue