diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 2effe95615..f1f5c73d74 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -209,6 +209,9 @@ Vector HackStudioWidget::selected_file_names() const void HackStudioWidget::open_file(const String& filename) { + if (Core::File::is_directory(filename)) + return; + if (!currently_open_file().is_empty()) { // Since the file is previously open, it should always be in m_open_files. ASSERT(m_open_files.find(currently_open_file()) != m_open_files.end());