Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
@@ -308,7 +308,7 @@ void Collada::_parse_image(XMLParser &parser) {
|
||||
String path = parser.get_attribute_value("source").strip_edges();
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path.percent_decode());
|
||||
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.percent_decode()));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -325,7 +325,7 @@ void Collada::_parse_image(XMLParser &parser) {
|
||||
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path);
|
||||
path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path));
|
||||
|
||||
} else if (path.find("file:///") == 0) {
|
||||
path = path.replace_first("file:///", "");
|
||||
|
||||
Reference in New Issue
Block a user