monkey2 icon indicating copy to clipboard operation
monkey2 copied to clipboard

Fixes #472

Open D-a-n-i-l-o opened this issue 5 years ago • 2 comments

Fix for the problem with '=' character in filenames/paths.

D-a-n-i-l-o avatar Apr 15 '19 08:04 D-a-n-i-l-o

Has this change been tested with modules and imported files?

Paths in monkey2 often infer scope which I suspect would appreciate decl characters only.

nitrologic avatar Jun 04 '19 20:06 nitrologic

I'm using the fix since April 15th 2019 and found no problems.

I re-compiled modules several times and had no problems, but modules don't use '=' in path anyway.

Monkey2 thinks that something with '=' is an compiler option, for example:

  • "-target=desktop"
  • "-config=debug"
  • "users/name/monkey/= Tests =/myfile.monkey2"

The fix just checks if the option starts with "-", because all options start with "-":

  • "-target="
  • "-config="

Paths like "users/name/monkey/= Tests =/myfile.monkey2" do not start with a "-", otherwise the compiler would again think it is an option.

This fix does not touch anything in the compiler. It is in mx2cc.monkey2 command-line parsing.

D-a-n-i-l-o avatar Jun 05 '19 09:06 D-a-n-i-l-o