Open 3vilguy opened 7 years ago
Would it work if we just replaced backslashes by forward slashes on Windows?
@elsassph Do you mean just replace it for alternateLocation
variable in same place my fix is done (createCodeBlockReference
function) ?
Or for the classFile
, which currently is done by FileSystem.fullPath()
and then it's calling createCodeBlockReference
function?
Just tried:
if(IS_WINDOWS) alternateLocation = StringTools.replace(alternateLocation, "\\", "/");
and it seems to be working as well.
I'm not really familiar with this library honestly (trying to find someone who worked on it), but maybe the path should be sanitized before, in createCodeBlockReference
when the alternateLocation
is constructed.
Makes sense. It can be merged once someone has confirmed that it passes all the unit tests (on a windows machine)
"Works on My Machine" ™
But you should double check it with someone else.
I was getting an error while trying to run unit tests for JS target.
After bit of digging I found that it's blowing up in PrintClientBase.hx#L510.
Seems like my
utils
package was causingeval()
issues because of\u
. After even more digging I finally found place where I can fix it, I came here to do a fork so i can PR and (surprise, surprise) I found THIS COMMIT. I think it was accidentally removed in this commit while fixing split on windows, but looks like this replace line is still needed before using regex. And just"\\\\"
are not enough, becauseeval()
is called again in printclient.js#L51.On top of that this PR should also fix https://github.com/massiveinteractive/mcover/issues/36
Regards :)