[1.12.2] pathing - possibly all versions
kreezxil opened this issue ยท 3 comments
packs that are created on a windows system using textures that use \ in the filename when installed on a linux system that use / in the file name do not load the textures. And vice versa.
This is because the two systems use a different way to get file names
Windows filename paths
c:\path\to\filename.txt
Linux filename paths
/home/minecraft/filename.txt
I believe this issue arises from your custom configuration handling, this is what I think based on looking at your source code.
Notes
1.12.2 has config annotations that are easy to use and implement and alleviate the need to discern the paths. You can let the java facility load/save paths and it will adjust based on the operating system it is on. default filename slashes for java have always be the '/' as used in Linux.
Believe it or not 1.14.4 and 1.15.2 both have a config method that can be implemented that can also provide the same features but without annotation. As I understand it, when they leave their beta stages they'll get annotations. Not holding my breath on it tho.
Resources
Stepping on your toes
not my intention, didn't know if you knew about that stuff so I shared it.
Ok I did a small test on my WINDOWS copy of the pack I'm working on,
if you switch to paths in the customization.txt to use linux style paths, the mod adjusts for that runs everything correctly, loading the animation and the textures.
suggestion
When pack builders enter
config\fancymenu\path\to\texture.png
instead of writing that verbatim, instead translate it to the linux style
config/fancymenu/path/to/texture.png
that will completely solve the problem I have reported here and hopefully won't require any major rewrite of your code.