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)
|
||||
{
|
||||
// is there a filter?
|
||||
if (m_currentFilter.Length > 0)
|
||||
if (m_iAction != FileChooser.ACTION_CHOOSE_DIR)
|
||||
{
|
||||
int dotPosition = m_currentFilter.LastIndexOf(".");
|
||||
if (dotPosition > 0)
|
||||
// is there a filter?
|
||||
if (m_currentFilter.Length > 0)
|
||||
{
|
||||
string sFileExt = m_currentFilter.Substring(dotPosition);
|
||||
if (!m_sFileSelected.EndsWith(sFileExt))
|
||||
int dotPosition = m_currentFilter.LastIndexOf(".");
|
||||
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