From ca3e2e20202146abd94d33349008765cffd7722f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 26 Apr 2026 18:33:52 -0300 Subject: [PATCH] If a full directory path is pasted in the File Name input and it's opened it will try to first open that directory, if valid it will open (SpartanJ/ecode#872). --- src/eepp/ui/uifiledialog.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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() &&