Merge pull request #26856 from neikeq/issue-26834

Mono: Fix assemblies path String incorrectly constructed from utf8
This commit is contained in:
Rémi Verschelde 2019-03-09 23:11:46 +01:00 committed by GitHub
commit 69ea7da766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -288,7 +288,7 @@ void GDMono::initialize() {
mono_install_unhandled_exception_hook(&unhandled_exception_hook, NULL); mono_install_unhandled_exception_hook(&unhandled_exception_hook, NULL);
#ifdef TOOLS_ENABLED #ifndef TOOLS_ENABLED
if (!DirAccess::exists("res://.mono")) { if (!DirAccess::exists("res://.mono")) {
// 'res://.mono/' is missing so there is nothing to load. We don't need to initialize mono, but // 'res://.mono/' is missing so there is nothing to load. We don't need to initialize mono, but
// we still do so unless mscorlib is missing (which is the case for projects that don't use C#). // we still do so unless mscorlib is missing (which is the case for projects that don't use C#).

View file

@ -50,7 +50,7 @@ void GDMonoAssembly::fill_search_dirs(Vector<String> &r_search_dirs, const Strin
const char *rootdir = mono_assembly_getrootdir(); const char *rootdir = mono_assembly_getrootdir();
if (rootdir) { if (rootdir) {
String framework_dir = String(rootdir).plus_file("mono").plus_file("4.5"); String framework_dir = String::utf8(rootdir).plus_file("mono").plus_file("4.5");
r_search_dirs.push_back(framework_dir); r_search_dirs.push_back(framework_dir);
r_search_dirs.push_back(framework_dir.plus_file("Facades")); r_search_dirs.push_back(framework_dir.plus_file("Facades"));
} }