From d1e07434a163b639908f5cb05aece1e2f3969c16 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 13 Mar 2021 03:51:40 +0200 Subject: [PATCH] GUI: Handle uppercase RAP file extension --- rpcs3/rpcs3qt/main_window.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 88b1d18c5b..972c65d3b5 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -515,7 +515,8 @@ bool main_window::InstallRapFile(const QString& path, const std::string& filenam { return false; } - return fs::copy_file(sstr(path), Emulator::GetHddDir() + "/home/" + Emu.GetUsr() + "/exdata/" + filename, true); + + return fs::copy_file(sstr(path), Emulator::GetHddDir() + "/home/" + Emu.GetUsr() + "/exdata/" + filename.substr(0, filename.find_last_of('.')) + ".rap", true); } void main_window::InstallPackages(QStringList file_paths) @@ -585,7 +586,7 @@ void main_window::InstallPackages(QStringList file_paths) } // Install rap files if available - for (const auto& rap : file_paths.filter(QRegExp(".*\\.rap"))) + for (const auto& rap : file_paths.filter(QRegExp(".*\\.rap", Qt::CaseInsensitive))) { const QFileInfo file_info(rap); const std::string rapname = sstr(file_info.fileName()); @@ -2566,7 +2567,7 @@ main_window::drop_type main_window::IsValidFile(const QMimeData& md, QStringList drop_type = drop_type::drop_pkg; } - else if (info.suffix() == "rap") + else if (info.suffix().toLower() == "rap") { if (drop_type != drop_type::drop_rap && drop_type != drop_type::drop_error) {