diff --git a/src/eepp/ui/uifiledialog.cpp b/src/eepp/ui/uifiledialog.cpp index c63750715..a5dbbf1fa 100644 --- a/src/eepp/ui/uifiledialog.cpp +++ b/src/eepp/ui/uifiledialog.cpp @@ -623,6 +623,20 @@ void UIFileDialog::open() { if ( usingNativeFileDialog() ) return; + std::string fileText = mFile->getText().toUtf8(); + + if ( allowFolderSelect() && FileSystem::isDirectory( fileText ) ) { + setCurPath( fileText ); + + sendCommonEvent( Event::OpenFile ); + + disableButtons(); + + closeWindow(); + + return; + } + auto fullPath( getFullPath() ); if ( mMultiView->getSelection().isEmpty() &&