Qt: Canonicalize memory card paths in settings

This commit is contained in:
Stenzek 2023-08-31 23:44:08 +10:00
parent 09e7a5843f
commit 0e6efb2241

View file

@ -191,7 +191,7 @@ void MemoryCardSettingsWidget::updateMemoryCardPath(int index)
std::string path( std::string path(
m_dialog->getEffectiveStringValue("MemoryCards", key, Settings::GetDefaultSharedMemoryCardName(index).c_str())); m_dialog->getEffectiveStringValue("MemoryCards", key, Settings::GetDefaultSharedMemoryCardName(index).c_str()));
if (!Path::IsAbsolute(path)) if (!Path::IsAbsolute(path))
path = Path::Combine(EmuFolders::MemoryCards, path); path = Path::Canonicalize(Path::Combine(EmuFolders::MemoryCards, path));
QSignalBlocker db(m_port_ui[index].memory_card_path); QSignalBlocker db(m_port_ui[index].memory_card_path);
m_port_ui[index].memory_card_path->setText(QString::fromStdString(path)); m_port_ui[index].memory_card_path->setText(QString::fromStdString(path));