Fix bug in FileChooser
This commit is contained in:
parent
79814b1f00
commit
307ed2444c
@ -110,6 +110,8 @@ namespace Novell.CASA.GUI
|
|||||||
DisplayChooser();
|
DisplayChooser();
|
||||||
|
|
||||||
if (m_sFileSelected != null)
|
if (m_sFileSelected != null)
|
||||||
|
{
|
||||||
|
if (m_iAction != FileChooser.ACTION_CHOOSE_DIR)
|
||||||
{
|
{
|
||||||
// is there a filter?
|
// is there a filter?
|
||||||
if (m_currentFilter.Length > 0)
|
if (m_currentFilter.Length > 0)
|
||||||
@ -118,12 +120,13 @@ namespace Novell.CASA.GUI
|
|||||||
if (dotPosition > 0)
|
if (dotPosition > 0)
|
||||||
{
|
{
|
||||||
string sFileExt = m_currentFilter.Substring(dotPosition);
|
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 + sFileExt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return m_currentDirectory + m_sFileSelected;
|
return m_currentDirectory + m_sFileSelected;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user