Fix bug in FileChooser

This commit is contained in:
Jim Norman 2006-09-07 20:19:43 +00:00
parent 79814b1f00
commit 307ed2444c

View File

@ -110,6 +110,8 @@ namespace Novell.CASA.GUI
DisplayChooser();
if (m_sFileSelected != null)
{
if (m_iAction != FileChooser.ACTION_CHOOSE_DIR)
{
// is there a filter?
if (m_currentFilter.Length > 0)
@ -118,12 +120,13 @@ namespace Novell.CASA.GUI
if (dotPosition > 0)
{
string sFileExt = m_currentFilter.Substring(dotPosition);
if (!m_sFileSelected.EndsWith(sFileExt))
if (!m_sFileSelected.EndsWith(sFileExt) && (!sFileExt.EndsWith("*")))
{
return m_currentDirectory + m_sFileSelected + sFileExt;
}
}
}
}
return m_currentDirectory + m_sFileSelected;