File tree Expand file tree Collapse file tree
Sources/OvWindowing/src/OvWindowing/Dialogs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,17 +80,17 @@ void OvWindowing::Dialogs::FileDialog::Show(EExplorerFlags p_flags)
8080 if (m_isSaveDialog)
8181 command += " --save" ;
8282
83- if (!m_initialDirectory. empty () || ! m_initialFilename.empty ())
83+ if (!m_initialFilename.empty ())
8484 {
85- command += " --filename=\" " + (std::filesystem::path{ m_initialDirectory } / m_initialFilename).string ();
86- if (m_initialFilename.empty () && m_initialDirectory.back () != ' /' )
87- command += " /" ;
88- command += " \" " ;
85+ command += " --filename=\" " + (std::filesystem::path{ m_initialDirectory } / m_initialFilename).string () + " \" " ;
8986 }
90- else
87+ else if (!m_initialDirectory. empty ())
9188 {
92- // Even without initial directory, --filename="" helps show the filename entry
93- command += " --filename=\"\" " ;
89+ // Add trailing slash to indicate directory for zenity
90+ command += " --filename=\" " + m_initialDirectory;
91+ if (m_initialDirectory.back () != ' /' )
92+ command += " /" ;
93+ command += " \" " ;
9494 }
9595
9696 // Add file filters if present
You can’t perform that action at this time.
0 commit comments