Skip to content

Commit

Permalink
Merge pull request #83329 from detomon/fix-creating-and-updating-plug…
Browse files Browse the repository at this point in the history
…in-with-dot-in-folder-name

Fix creating and updating plugin with dot in folder name
  • Loading branch information
akien-mga committed Dec 13, 2023
2 parents 41365c6 + 46253bd commit 481d046
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/plugin_config_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void PluginConfigDialog::_on_confirmed() {
int lang_idx = script_option_edit->get_selected();
String ext = ScriptServer::get_language(lang_idx)->get_extension();
String script_name = script_edit->get_text().is_empty() ? _get_subfolder() : script_edit->get_text();
if (script_name.get_extension().is_empty()) {
if (script_name.get_extension() != ext) {
script_name += "." + ext;
}
String script_path = path.path_join(script_name);
Expand Down Expand Up @@ -152,7 +152,7 @@ void PluginConfigDialog::config(const String &p_config_path) {
ERR_FAIL_COND_MSG(err != OK, "Cannot load config file from path '" + p_config_path + "'.");

name_edit->set_text(cf->get_value("plugin", "name", ""));
subfolder_edit->set_text(p_config_path.get_base_dir().get_basename().get_file());
subfolder_edit->set_text(p_config_path.get_base_dir().get_file());
desc_edit->set_text(cf->get_value("plugin", "description", ""));
author_edit->set_text(cf->get_value("plugin", "author", ""));
version_edit->set_text(cf->get_value("plugin", "version", ""));
Expand Down

0 comments on commit 481d046

Please sign in to comment.