Fix bug in FileChooser
This commit is contained in:
parent
79814b1f00
commit
307ed2444c
@ -111,16 +111,19 @@ namespace Novell.CASA.GUI
|
|||||||
|
|
||||||
if (m_sFileSelected != null)
|
if (m_sFileSelected != null)
|
||||||
{
|
{
|
||||||
// is there a filter?
|
if (m_iAction != FileChooser.ACTION_CHOOSE_DIR)
|
||||||
if (m_currentFilter.Length > 0)
|
|
||||||
{
|
{
|
||||||
int dotPosition = m_currentFilter.LastIndexOf(".");
|
// is there a filter?
|
||||||
if (dotPosition > 0)
|
if (m_currentFilter.Length > 0)
|
||||||
{
|
{
|
||||||
string sFileExt = m_currentFilter.Substring(dotPosition);
|
int dotPosition = m_currentFilter.LastIndexOf(".");
|
||||||
if (!m_sFileSelected.EndsWith(sFileExt))
|
if (dotPosition > 0)
|
||||||
{
|
{
|
||||||
return m_currentDirectory + m_sFileSelected + sFileExt;
|
string sFileExt = m_currentFilter.Substring(dotPosition);
|
||||||
|
if (!m_sFileSelected.EndsWith(sFileExt) && (!sFileExt.EndsWith("*")))
|
||||||
|
{
|
||||||
|
return m_currentDirectory + m_sFileSelected + sFileExt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user