Inventory Tweaks [1.12 only]

Inventory Tweaks [1.12 only]

127M Downloads

Invalid rules and tree files automatically deleted without being backed up

Adamantium9001 opened this issue ยท 3 comments

commented

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"

commented

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.

commented

So there should be a backup of the files in the same directory, with a .bak extension? Because there isn't.

commented

Same here. I have InventoryTweaks 1.58-147 and only 2 files were backed up : InvTweaks.cfg.bak and InvTweaksRules.txt.bak.
The file InvTweaksTree.txt.bak is missing.