Fix parent folder not being shown in editor file browser, fix typo

The check for multiple storage locations was using the base path from the previous invocation of the file dialog instead of using the new base path.

Closes #7463.
This commit is contained in:
Robert Müller 2023-11-15 22:28:46 +01:00
parent dfbff0eb57
commit f54fc2e441

View file

@ -5144,15 +5144,15 @@ void CEditor::InvokeFileDialog(int StorageType, int FileType, const char *pTitle
m_FileDialogStorageType = StorageType;
if(m_FileDialogStorageType == IStorage::TYPE_ALL)
{
int NumStoragedWithFolder = 0;
int NumStoragesWithFolder = 0;
for(int CheckStorageType = IStorage::TYPE_SAVE; CheckStorageType < Storage()->NumPaths(); ++CheckStorageType)
{
if(Storage()->FolderExists(m_pFileDialogPath, CheckStorageType))
if(Storage()->FolderExists(pBasePath, CheckStorageType))
{
NumStoragedWithFolder++;
NumStoragesWithFolder++;
}
}
m_FileDialogMultipleStorages = NumStoragedWithFolder > 1;
m_FileDialogMultipleStorages = NumStoragesWithFolder > 1;
}
else
{