summaryrefslogtreecommitdiff
path: root/modules/mono/utils
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-27 11:54:30 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-01-27 11:54:32 +0100
commit57c0082533cfc7a15570cb40a92ce53c6020ca2d (patch)
treed762a41f38459ce0f571595249e4c865f2af5c81 /modules/mono/utils
parente2b839134db3e642e92c353333c50359fd15b539 (diff)
Mono: Test Windows binaries with lowercase extension
To help users writing good cross-platform code, Godot's `FileAccessWindows:open()` will issue a warning on case mismatch, which happens here with capitalized extensions given by `PATHEXT` compared to actual file extensions which are lowercase 99% of the time. Fixes #25368.
Diffstat (limited to 'modules/mono/utils')
-rw-r--r--modules/mono/utils/path_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp
index 80f2324e15..6e431f51e7 100644
--- a/modules/mono/utils/path_utils.cpp
+++ b/modules/mono/utils/path_utils.cpp
@@ -59,7 +59,7 @@ String path_which(const String &p_name) {
#ifdef WINDOWS_ENABLED
for (int j = 0; j < exts.size(); j++) {
- String p2 = p + exts[j];
+ String p2 = p + exts[j].to_lower(); // lowercase to reduce risk of case mismatch warning
if (FileAccess::exists(p2))
return p2;