Invalid rules and tree files automatically deleted without being backed up
Adamantium9001 opened this issue ยท 3 comments
I just lost many hours of work customizing the rules and tree files. I was doing it with Minecraft open (but not really playing it). I suppose I saved the tree file without closing a tag or something, because the game tried to reload these files, decided they were corrupted, and deleted them and replaced them with the default versions.
Since the mod is designed with the manual editing of both of these files in mind, I would think it essential that a backup of them be created any time they are automatically reverted to default.
And why are both files wiped when only one of them is unusable? That's downright appalling.
Edit: in case version matters, my jar is "InventoryTweaks-1.59-dev-156.jar"
All config files are baked up when it needs to reset: https://github.com/Kobata/inventory-tweaks/blob/develop/src/main/java/invtweaks/InvTweaksConfigManager.java#L167
It does the resetting of the files when an error occurs, because the mod is not very good at dealing with configuration errors and will generally immediately crash, and people messing up configs was the leading cause of crashes before I made it revert to a known good state.
So there should be a backup of the files in the same directory, with a .bak extension? Because there isn't.