Skip to content

Commit

Permalink
Only escape backslashes in Android paths.
Browse files Browse the repository at this point in the history
Neither .properties nor .gradle files require anything else to be escaped. And at least in .gradle files, escaping anything else is incorrect.
  • Loading branch information
player-03 committed Oct 24, 2023
1 parent 1a3a9bd commit d931869
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,8 @@ class AndroidPlatform extends PlatformTarget
context.ANDROID_BUILD_TOOLS_VERSION = AndroidHelper.getBuildToolsVersion(project);
}

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");
context.ANDROID_SDK_ESCAPED = StringTools.replace(context.ENV_ANDROID_SDK, "\\", "\\\\");
context.ANDROID_NDK_ROOT_ESCAPED = StringTools.replace(context.ENV_ANDROID_NDK_ROOT, "\\", "\\\\");

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, "\\", "\\\\");
Expand Down

0 comments on commit d931869

Please sign in to comment.