lambda-client/lambda

Map downloader bugged

jaer3221 opened this issue · 0 comments

Describe the bug
Map downloader module doesn't download maps with special characters in map name

Steps to reproduce the bug

  1. Have map name with any special character (, |, /, :,*, ?, ", <, > ) in your inventory
  2. Activate MapDownloader module
  3. Map is not present in /lambda/map-images folder
  4. Minecraft console logs java.io.FileNotFoundException

Expected behavior
Map should apear in the folder named with no special character in its name

Debug info
the ;tsc command doesn't work after the bug occurs (probably something u guys have to look into also) but here it is the same command right before the bug is replicated:
image

Additional context / media
The bug is actually pretty easy to fix. Just add ".replace("char", "_")" in "src/main/kotlin/com/lambda/client/module/modules/misc/MapDownloader.kt", where char is a special character (, |, /, :,*, ?, ", <, > ).
This could be done better just by turning the string into an ASCII or just using a good regular expression.