@@ -881,7 +881,7 @@ bool main_window::InstallFileInExData(const std::string& extension, const QStrin
881881 return to.commit ();
882882}
883883
884- bool main_window::InstallPackages (main_window* mw, QStringList file_paths, bool from_boot)
884+ bool main_window::InstallPackages (main_window* mw, QStringList file_paths, bool from_boot, bool from_optical_drive )
885885{
886886 if (file_paths.isEmpty ())
887887 {
@@ -926,7 +926,7 @@ bool main_window::InstallPackages(main_window* mw, QStringList file_paths, bool
926926 return true ;
927927 }
928928
929- return InstallPackages (mw, dir_file_paths, from_boot);
929+ return InstallPackages (mw, dir_file_paths, from_boot, from_optical_drive );
930930 }
931931 }
932932
@@ -986,26 +986,23 @@ bool main_window::InstallPackages(main_window* mw, QStringList file_paths, bool
986986
987987 if (from_boot)
988988 {
989- return HandlePackageInstallation (mw, file_paths, true );
989+ return HandlePackageInstallation (mw, file_paths, true , from_optical_drive );
990990 }
991991
992- // Handle further installations with a timeout. Otherwise the source explorer instance is not usable during the following file processing.
993992 if (mw)
994993 {
995- QTimer::singleShot (0 , [mw, paths = std::move (file_paths)]()
994+ // Handle further installations with a timeout. Otherwise the source explorer instance is not usable during the following file processing.
995+ QTimer::singleShot (0 , [mw, from_optical_drive, paths = std::move (file_paths)]()
996996 {
997- HandlePackageInstallation (mw, paths, false );
997+ HandlePackageInstallation (mw, paths, false , from_optical_drive );
998998 });
999- }
1000- else
1001- {
1002- return HandlePackageInstallation (nullptr , file_paths, false );
999+ return true ;
10031000 }
10041001
1005- return true ;
1002+ return HandlePackageInstallation ( nullptr , file_paths, false , from_optical_drive) ;
10061003}
10071004
1008- bool main_window::HandlePackageInstallation (main_window* mw, QStringList file_paths, bool from_boot)
1005+ bool main_window::HandlePackageInstallation (main_window* mw, QStringList file_paths, bool from_boot, bool from_optical_drive )
10091006{
10101007 if (file_paths.empty ())
10111008 {
@@ -1135,9 +1132,9 @@ bool main_window::HandlePackageInstallation(main_window* mw, QStringList file_pa
11351132 std::deque<std::string> bootable_paths;
11361133
11371134 // Run PKG unpacking asynchronously
1138- named_thread worker (" PKG Installer" , [&readers, &result, &bootable_paths]
1135+ named_thread worker (" PKG Installer" , [&readers, &result, &bootable_paths, from_optical_drive ]
11391136 {
1140- result = package_reader::extract_data (readers, bootable_paths);
1137+ result = package_reader::extract_data (readers, bootable_paths, from_optical_drive );
11411138 return result.error == package_install_result::error_type::no_error;
11421139 });
11431140
0 commit comments