From 2853bf851ac91828c3ed86784103d4ea27a99cb3 Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Fri, 17 Jul 2020 18:43:30 -0700 Subject: [PATCH] Qt/GameListSettings: Use native path separators Fixes possible duplicate game list entries on Windows. --- src/duckstation-qt/gamelistsettingswidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/gamelistsettingswidget.cpp b/src/duckstation-qt/gamelistsettingswidget.cpp index 985568621..36732f132 100644 --- a/src/duckstation-qt/gamelistsettingswidget.cpp +++ b/src/duckstation-qt/gamelistsettingswidget.cpp @@ -248,7 +248,9 @@ void GameListSettingsWidget::onDirectoryListItemClicked(const QModelIndex& index void GameListSettingsWidget::addSearchDirectory(QWidget* parent_widget) { - QString dir = QFileDialog::getExistingDirectory(parent_widget, tr("Select Search Directory")); + QString dir = + QDir::toNativeSeparators(QFileDialog::getExistingDirectory(parent_widget, tr("Select Search Directory"))); + if (dir.isEmpty()) return;