Skip to content

Commit

Permalink
Merge pull request #82842 from YuriSizov/gdext-icons-are-relative-maaaan
Browse files Browse the repository at this point in the history
Resolve relative icon paths for GDExtensions
  • Loading branch information
akien-mga committed Oct 5, 2023
2 parents 3b70e30 + d427851 commit af232e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/extension/gdextension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,12 @@ Error GDExtensionResourceLoader::load_gdextension_resource(const String &p_path,
List<String> keys;
config->get_section_keys("icons", &keys);
for (const String &key : keys) {
p_extension->class_icon_paths[key] = config->get_value("icons", key);
String icon_path = config->get_value("icons", key);
if (icon_path.is_relative_path()) {
icon_path = p_path.get_base_dir().path_join(icon_path);
}

p_extension->class_icon_paths[key] = icon_path;
}
}

Expand Down

0 comments on commit af232e6

Please sign in to comment.