@@ -673,6 +673,12 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
673
673
QMessageBox::critical (this , tr (" PKG ERROR" ), QString::fromStdString (failreason));
674
674
return ;
675
675
}
676
+ if (!psf.Open (pkg.sfo )) {
677
+ QMessageBox::critical (this , tr (" PKG ERROR" ),
678
+ " Could not read SFO. Check log for details" );
679
+ return ;
680
+ }
681
+ auto category = psf.GetString (" CATEGORY" );
676
682
InstallDirSelect ids;
677
683
ids.exec ();
678
684
auto game_install_dir = ids.getSelectedDirectory ();
@@ -689,12 +695,6 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
689
695
QMessageBox msgBox;
690
696
msgBox.setWindowTitle (tr (" PKG Extraction" ));
691
697
692
- if (!psf.Open (pkg.sfo )) {
693
- QMessageBox::critical (this , tr (" PKG ERROR" ),
694
- " Could not read SFO. Check log for details" );
695
- return ;
696
- }
697
-
698
698
std::string content_id;
699
699
if (auto value = psf.GetString (" CONTENT_ID" ); value.has_value ()) {
700
700
content_id = std::string{*value};
@@ -709,7 +709,6 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
709
709
QString addonDirPath;
710
710
Common::FS::PathToQString (addonDirPath, addon_extract_path);
711
711
QDir addon_dir (addonDirPath);
712
- auto category = psf.GetString (" CATEGORY" );
713
712
714
713
if (pkgType.contains (" PATCH" )) {
715
714
QString pkg_app_version;
@@ -802,9 +801,10 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
802
801
}
803
802
} else {
804
803
// Do nothing;
805
- if (pkgType.contains (" PATCH" )) {
806
- QMessageBox::information (this , tr (" PKG Extraction" ),
807
- tr (" PKG is a patch, please install the game first!" ));
804
+ if (pkgType.contains (" PATCH" ) || category == " ac" ) {
805
+ QMessageBox::information (
806
+ this , tr (" PKG Extraction" ),
807
+ tr (" PKG is a patch or DLC, please install the game first!" ));
808
808
return ;
809
809
}
810
810
// what else?
0 commit comments