@@ -1345,6 +1345,8 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
13451345 }
13461346
13471347 bool do_export = true ;
1348+ bool skip_all = false ;
1349+ int skipped_i = export_plugins.size () - 1 ;
13481350 for (int i = 0 ; i < export_plugins.size (); i++) {
13491351 if (GDVIRTUAL_IS_OVERRIDDEN_PTR (export_plugins[i], _export_file)) {
13501352 export_plugins.write [i]->_export_file_script (path, type, features_psa);
@@ -1360,26 +1362,30 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
13601362 }
13611363 }
13621364
1363- for (int j = 0 ; j < export_plugins[i]->extra_files .size (); j++) {
1364- err = save_proxy.save_file (p_udata, export_plugins[i]->extra_files [j].path , export_plugins[i]->extra_files [j].data , idx, total, enc_in_filters, enc_ex_filters, key, seed);
1365- if (err != OK) {
1366- return err;
1367- }
1368- if (export_plugins[i]->extra_files [j].remap ) {
1369- do_export = false ; // If remap, do not.
1370- path_remaps.push_back (path);
1371- path_remaps.push_back (export_plugins[i]->extra_files [j].path );
1372- }
1373- }
1374-
13751365 if (export_plugins[i]->skipped ) {
13761366 do_export = false ;
1367+ skip_all = true ;
1368+ skipped_i = i;
1369+ break ;
13771370 }
1378- export_plugins. write [i]-> _clear ();
1371+ }
13791372
1380- if (!do_export) {
1381- break ;
1373+ for (int i = 0 ; i <= skipped_i; i++) {
1374+ if (!skip_all) {
1375+ for (const EditorExportPlugin::ExtraFile &extra_file : export_plugins[i]->extra_files ) {
1376+ err = save_proxy.save_file (p_udata, extra_file.path , extra_file.data , idx, total, enc_in_filters, enc_ex_filters, key, seed);
1377+ if (err != OK) {
1378+ return err;
1379+ }
1380+ if (extra_file.remap ) {
1381+ do_export = false ; // If remap, do not.
1382+ path_remaps.push_back (path);
1383+ path_remaps.push_back (extra_file.path );
1384+ }
1385+ }
13821386 }
1387+
1388+ export_plugins.write [i]->_clear ();
13831389 }
13841390 if (!do_export) {
13851391 continue ;
0 commit comments