|
@@ -671,15 +671,28 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
|
|
wip_open=p_and_open;
|
|
wip_open=p_and_open;
|
|
//' ImportMonitorBlock imb;
|
|
//' ImportMonitorBlock imb;
|
|
|
|
|
|
- if (import_path->get_text()=="") {
|
|
|
|
|
|
+
|
|
|
|
+ if (import_path->get_text().strip_edges()=="") {
|
|
error_dialog->set_text("Source path is empty.");
|
|
error_dialog->set_text("Source path is empty.");
|
|
- error_dialog->popup_centered(Size2(200,100));
|
|
|
|
|
|
+ error_dialog->popup_centered_minsize();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (save_path->get_text()=="") {
|
|
|
|
|
|
+ if (save_path->get_text().strip_edges()=="") {
|
|
error_dialog->set_text("Target path is empty.");
|
|
error_dialog->set_text("Target path is empty.");
|
|
- error_dialog->popup_centered(Size2(200,100));
|
|
|
|
|
|
+ error_dialog->popup_centered_minsize();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!save_path->get_text().begins_with("res://")) {
|
|
|
|
+ error_dialog->set_text("Target path must be full resource path.");
|
|
|
|
+ error_dialog->popup_centered_minsize();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!DirAccess::exists(save_path->get_text())) {
|
|
|
|
+ error_dialog->set_text("Target path must exist.");
|
|
|
|
+ error_dialog->popup_centered_minsize();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|