misode / misode.github.io

Data Pack Generators and Tools for Minecraft 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21
https://misode.github.io/
MIT License
545 stars 71 forks source link

Undeletable file #540

Closed miniking1000 closed 14 hours ago

miniking1000 commented 3 months ago

If you save file with bad symbols, you wont be able to delete/rename it.

How to reproduce: 1)create a file(I was doing advancements) and save it as name/.json 2)done. now file is just there. and you can't delete it, or rename it.

misode commented 3 weeks ago

I cannot reproduce this. What exactly do you mean with "bad symbols"? Could you share the exact file name that is causing issues for you @miniking1000?

miniking1000 commented 3 weeks ago

This all because of this symbol -> \ <- (U+005C)

you can do it with any name if it ends with it, for example 'name\' or 'haha\'

when I typed original issue I think I did not pay attention weather it was regular or back slash, and wrote the wrong one, all those names are bugged: image

misode commented 3 weeks ago

Thank you, I can confirm now!

misode commented 14 hours ago

I decided to fix this by validating the file names when you save or rename a file. For now it is still impossible to delete or open files with invalid characters already in them (due to importing a project zip for example), but I may revisit that in the future