summaryrefslogtreecommitdiff
path: root/editor/editor_export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r--editor/editor_export.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 716ead9afc..951bec2c83 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -90,6 +90,18 @@ Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
return platform;
}
+void EditorExportPreset::update_files_to_export() {
+ Vector<String> to_remove;
+ for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) {
+ if (!FileAccess::exists(E->get())) {
+ to_remove.push_back(E->get());
+ }
+ }
+ for (int i = 0; i < to_remove.size(); ++i) {
+ selected_files.erase(to_remove[i]);
+ }
+}
+
Vector<String> EditorExportPreset::get_files_to_export() const {
Vector<String> files;
for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) {
@@ -1298,7 +1310,11 @@ void EditorExport::load_config() {
Vector<String> files = config->get_value(section, "export_files");
for (int i = 0; i < files.size(); i++) {
- preset->add_export_file(files[i]);
+ if (!FileAccess::exists(files[i])) {
+ preset->remove_export_file(files[i]);
+ } else {
+ preset->add_export_file(files[i]);
+ }
}
}