Editor: Don't enter directory name in filename in save menu

This commit is contained in:
def 2019-04-13 13:19:50 +02:00
parent 598c8cf1c6
commit f1cf222e95

View file

@ -4501,7 +4501,7 @@ void CEditor::FilelistPopulate(int StorageType)
m_FilePreviewImage = 0;
m_aFileDialogActivate = false;
if(m_FilesSelectedIndex >= 0)
if(m_FilesSelectedIndex >= 0 && !m_FileList[m_FilesSelectedIndex].m_IsDir)
str_copy(m_aFileDialogFileName, m_FileList[m_FilesSelectedIndex].m_aFilename, sizeof(m_aFileDialogFileName));
else
m_aFileDialogFileName[0] = 0;