Crashes when inputting an illegal character on save/rename
CreepahJacket opened this issue ยท 3 comments
Issue
Game instantly crashes when inputting an illegal character (/ ? < > \ : * | ") on save/rename
How to replicate
- After recording a replay file, input an illegal character in the name.
- Hit save.
Alternatively,
- Go to the replay menu
- Try to rename a replay file with an illegal character.
What I expected
The mod does not allow you to input illegal characters when renaming/saving a file.
Crash Report
The game crashed whilst chartyped event handler
Error: java.nio.file.InvalidPathException: Illegal char <<> at index 19: 2022_03_30_15_16_08<.mcpr
Exit Code: -1
huh, odd. i've updated the issue to include the crash report, though i'm guessing that it's something to do with the platform i'm on, since windows has a thing with illegal characters
Ah, yes, that'll be it. On Windows it errors as soon as the Path is put together, on Linux it only errors if you try to access it, and I'm only handling the latter one.
Edit: Not directly related, but I also just realized that I need to filter out the path separator (/
or \
) so it doesn't create folders.