2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #6092 from ivan-boikov/cancel-dir-select

Fix cancelation of getExistingDirectory dialog
This commit is contained in:
bunnei 2021-03-22 17:55:18 -07:00 committed by GitHub
commit dde074eaab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,10 @@ void ConfigureFilesystem::SetDirectory(DirectoryTarget target, QLineEdit* edit)
str = QFileDialog::getOpenFileName(this, caption, QFileInfo(edit->text()).dir().path(),
QStringLiteral("NX Gamecard;*.xci"));
} else {
str = QFileDialog::getExistingDirectory(this, caption, edit->text()) + QDir::separator();
str = QFileDialog::getExistingDirectory(this, caption, edit->text());
if (!str.isNull() && str.back() != QDir::separator()) {
str.append(QDir::separator());
}
}
if (str.isEmpty())