From 9e09165e820e3a5449925cb05b3d96690441fde6 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Sun, 22 Oct 2023 13:17:03 -0400 Subject: [PATCH] Bug fix: `C:` becomes `C\:` on Windows. --- tools/platforms/AndroidPlatform.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/platforms/AndroidPlatform.hx b/tools/platforms/AndroidPlatform.hx index 47bb6aac0a..749faa085e 100644 --- a/tools/platforms/AndroidPlatform.hx +++ b/tools/platforms/AndroidPlatform.hx @@ -493,6 +493,11 @@ class AndroidPlatform extends PlatformTarget var escaped = ~/([ #!=\\:])/g; context.ANDROID_SDK_ESCAPED = escaped.replace(context.ENV_ANDROID_SDK, "\\$1"); context.ANDROID_NDK_ROOT_ESCAPED = escaped.replace(context.ENV_ANDROID_NDK_ROOT, "\\$1"); + if(project.host == WINDOWS) { + var drive = ~/^([A-Z])\\:/; + context.ANDROID_SDK_ESCAPED = drive.replace(context.ANDROID_SDK_ESCAPED, "$1:"); + context.ANDROID_NDK_ROOT_ESCAPED = drive.replace(context.ANDROID_NDK_ROOT_ESCAPED, "$1:"); + } if (Reflect.hasField(context, "KEY_STORE")) context.KEY_STORE = StringTools.replace(context.KEY_STORE, "\\", "\\\\"); if (Reflect.hasField(context, "KEY_STORE_ALIAS")) context.KEY_STORE_ALIAS = StringTools.replace(context.KEY_STORE_ALIAS, "\\", "\\\\");