summaryrefslogtreecommitdiff
path: root/modules/mono/utils/path_utils.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-07-27 13:43:20 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-09-03 19:56:24 +0300
commit80b8eff6aa41ba79175a5152ba5b2b9b16f6de3f (patch)
tree39ed96f7b9062e2f4ae1e20560fdb1f2f04c4d67 /modules/mono/utils/path_utils.cpp
parent0864f12f0de50ffecbc9964cdf4edbae75e27be5 (diff)
[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.
Diffstat (limited to 'modules/mono/utils/path_utils.cpp')
-rw-r--r--modules/mono/utils/path_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp
index ccfaf5aba7..d91dcb5981 100644
--- a/modules/mono/utils/path_utils.cpp
+++ b/modules/mono/utils/path_utils.cpp
@@ -86,7 +86,7 @@ String abspath(const String &p_path) {
String realpath(const String &p_path) {
#ifdef WINDOWS_ENABLED
// Open file without read/write access
- HANDLE hFile = ::CreateFileW(p_path.c_str(), 0,
+ HANDLE hFile = ::CreateFileW((LPCWSTR)(p_path.utf16().get_data()), 0,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
@@ -130,7 +130,7 @@ String join(const String &p_a, const String &p_b) {
return p_b;
}
- const CharType a_last = p_a[p_a.length() - 1];
+ const char32_t a_last = p_a[p_a.length() - 1];
if ((a_last == '/' || a_last == '\\') ||
(p_b.size() > 0 && (p_b[0] == '/' || p_b[0] == '\\'))) {
return p_a + p_b;