summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-10-30 21:12:54 +0100
committerGitHub <noreply@github.com>2017-10-30 21:12:54 +0100
commitd55e2d0893a9179b4cd103d3a0d7417b56cea629 (patch)
tree9adcc9a6561e21524067019da26bc991fa965e13 /modules
parent495bcd730177f58053b8e76199d3ccd15ca0dcc9 (diff)
parent9290fd2a42c50ebfbf56aadc458ad6287fc19eae (diff)
Merge pull request #12522 from neikeq/where.exe-is-a-liar
Fix 'which' returning file without extension on Windows
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/utils/path_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp
index c8581f6122..105c2c981e 100644
--- a/modules/mono/utils/path_utils.cpp
+++ b/modules/mono/utils/path_utils.cpp
@@ -56,9 +56,6 @@ String path_which(const String &p_name) {
for (int i = 0; i < env_path.size(); i++) {
String p = path_join(env_path[i], p_name);
- if (FileAccess::exists(p))
- return p;
-
#ifdef WINDOWS_ENABLED
for (int j = 0; j < exts.size(); j++) {
String p2 = p + exts[j];
@@ -66,6 +63,9 @@ String path_which(const String &p_name) {
if (FileAccess::exists(p2))
return p2;
}
+#else
+ if (FileAccess::exists(p))
+ return p;
#endif
}