diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index a0fd5bdc7e8..1dc2236873b 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -2296,7 +2296,9 @@ void EditorManagerPrivate::findInDirectory() { if (!d->m_contextMenuEntry || d->m_contextMenuEntry->fileName().isEmpty()) return; - emit m_instance->findOnFileSystemRequest(d->m_contextMenuEntry->fileName().parentDir().toString()); + const FileName path = d->m_contextMenuEntry->fileName(); + emit m_instance->findOnFileSystemRequest( + (path.toFileInfo().isDir() ? path : path.parentDir()).toString()); } void EditorManagerPrivate::split(Qt::Orientation orientation)