From df9151481c56512d05fc939313e3c944eac87819 Mon Sep 17 00:00:00 2001 From: Missake212 Date: Sat, 29 Mar 2025 08:32:57 +0000 Subject: [PATCH] Fix the "Open Update Folder" for folders ending with "-patch" (#2712) * fix open update folder * Update gui_context_menus.h --- src/qt_gui/gui_context_menus.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index 7dcb006ba..c13388bbc 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -141,14 +141,16 @@ public: Common::FS::PathToQString(open_update_path, m_games[itemID].path); open_update_path += "-UPDATE"; 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))) { + QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path)); + } else { QMessageBox::critical(nullptr, tr("Error"), QString(tr("This game has no update folder to open!"))); } - } else { - QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path)); } }