Update gui_context_menus.h

This commit is contained in:
Missake212 2025-03-29 05:28:52 +00:00 committed by GitHub
parent fef3cdd2cf
commit d9cc29018b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,12 +140,12 @@ public:
QString open_update_path;
Common::FS::PathToQString(open_update_path, m_games[itemID].path);
open_update_path += "-UPDATE";
if (std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) {
if (!std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) {
QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path));
} else {
Common::FS::PathToQString(open_update_path, m_games[itemID].path);
open_update_path += "-patch";
if (std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) {
if (!std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) {
QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path));
} else {
QMessageBox::critical(nullptr, tr("Error"),