From e72ee23c43fad5a4543cd1849b058cd77bc0e912 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 8 Sep 2020 19:34:21 +0200 Subject: [PATCH] [3.2] C#: Fix endless reload loop if project has unicode chars The assembly modified time wasn't picked properly as the path was treated as latin-1, so the file watcher was constantly firing the event. --- modules/mono/mono_gd/gd_mono_assembly.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index 040c30eb47..7a56f71d99 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -109,7 +109,7 @@ void GDMonoAssembly::assembly_load_hook(MonoAssembly *assembly, [[maybe_unused]] GDMonoAssembly *gdassembly = memnew(GDMonoAssembly(name, image, assembly)); #ifdef GD_MONO_HOT_RELOAD - const char *path = mono_image_get_filename(image); + String path = String::utf8(mono_image_get_filename(image)); if (FileAccess::exists(path)) gdassembly->modified_time = FileAccess::get_modified_time(path); #endif