Finishing a new replay and saving it deletes `.mcpr.tmp` folders of other replays
Abwasserrohr opened this issue ยท 3 comments
Hello there. ๐
I had two ReplayMod instances open, one recording and with one creating new timelines using the Keyframe Repository. But after saving the created (new) recording, the .mcpr.tmp
folder of the replay I'm currently editing suddenly disappeared with all files stored there, like the timelines.json
.
I know it's probably not suggested to use two instances at once, but it's still unexpected that the saving process deletes other tmp folders I guess.
ReplayMod v2.6.1
Minecraft 1.17.1
running 2 instances using the same .minecraft
folder can already cause unexpected behaviours and is not recommended by Mojang.
All bets are off when you run two Minecraft instances with the same .minecraft folder at the same time. Not only with RM but also with vanilla MC itself, so this is currently not supported at all in the RM.
To explain the unexpected: It's not the saving which deletes them, it's opening the Replay Viewer that does. Cause when you open that, it needs to open all the replay files for reading and this automatically triggers the crash recovery code which merges the the .mcpr.tmp files back into the .mcpr file.
I have some plans for a custom mcpr2 format which doesn't require the tmp folders and re-writing the whole file for changes. Once/if that materializes it may not be too difficult to use OS-level file locks to prevent one instance from touching files which are open in another instance, and I may then reconsider this issue.