blockout22 / OverwatchVisualScripting

Write Overwatch Scripts using node based scripting
MIT License
15 stars 1 forks source link

Fix jar path detection to allow spaces and other special characters #1

Closed kxtbit closed 1 year ago

kxtbit commented 1 year ago

I found a bug in the current code for getting the current path of the running jar file to load the nodes from. If the path had spaces (and probably other special characters), they would be substituted for %20 as in URL encoding and finding the jar file would fail. This pull request changes the method for retrieving the path of the jar file to a more reliable one that can properly handle spaces.

I should also note that to get the code to compile, I had to change version "3.3.2-SNAPSOT" of lwjgl-bom in the pom.xml to "3.3.2", however I did not include this change in the PR because I'm not too experienced using Maven and this might only be an issue on my end.

I apologize if I've made a mistake, this is my first time contributing on GitHub. Thanks :)

blockout22 commented 1 year ago

I haven't looked at that class in a while but having a quick look I think it only reads .class file which can't contain spaces to begin with but since you may be having an issue with it I don't see any harm it adding this fix. thanks for the contribution

as for the POM changes I had some problems when I was first using it with actions which have been failing recently maybe your suggested change might fix that

EDIT: changing the POM did fix things thank you

kxtbit commented 1 year ago

Glad to help!