Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only escape backslashes in Android paths. #1721

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

player-03
Copy link
Contributor

Neither .properties nor .gradle files require anything else to be escaped, and in .gradle files, escaping anything else is incorrect.

I think most of these weren't well-tested in the first place. On Linux* I was able to use the #!= characters without any trouble at all, while colons caused hxcpp to be unable to find the g++ executable. (For the latter, it makes no difference whether we do or don't escape it, because hxcpp doesn't get the file path from Lime.)

*And it's clear this wasn't well-tested on Windows either, since it escapes the colon in "C:".

Supersedes #1720, or vice versa.

Neither .properties nor .gradle files require anything else to be escaped. And at least in .gradle files, escaping anything else is incorrect.
@player-03
Copy link
Contributor Author

So, funny story. I went to track down whoever added that character-escaping code and ask why it was there.

...

...Turns out? That was me.

(Makes sense in retrospect. I might be the only Lime dev who regularly uses regexes.)

I don't recall doing it, but after reviewing some documentation for .properties files, it's clear I was trying to escape characters with special meanings in .properties files. Of the six characters in the regex, two indicate comments, three are used as delimiters, and backslash escapes characters. However, comments only work at the beginning of the line, and only the first delimiter on a line has any effect, so we never needed to escape those characters. And I guess .properties files ignore extraneous backslashes, so it still worked even though it wasn't correct.

@player-03 player-03 merged commit a6aad10 into openfl:develop Oct 25, 2023
26 checks passed
@player-03 player-03 deleted the escaped-characters branch October 25, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant