1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #29815 from NilsIrl/plus_file_1

Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
Rémi Verschelde
2019-07-01 12:06:35 +02:00
committed by GitHub
17 changed files with 39 additions and 39 deletions

View File

@@ -2818,7 +2818,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
Ref<ConfigFile> cf;
cf.instance();
String addon_path = "res://addons/" + p_addon + "/plugin.cfg";
String addon_path = String("res://addons").plus_file(p_addon).plus_file("plugin.cfg");
if (!DirAccess::exists(addon_path.get_base_dir())) {
ProjectSettings *ps = ProjectSettings::get_singleton();
PoolStringArray enabled_plugins = ps->get("editor_plugins/enabled");
@@ -2845,7 +2845,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
}
String path = cf->get_value("plugin", "script");
path = "res://addons/" + p_addon + "/" + path;
path = String("res://addons").plus_file(p_addon).plus_file(path);
Ref<Script> script = ResourceLoader::load(path);