Autosave creation shouldn't delete the old autosave until the new one is finished being created

Continuing the discussion from Error in opening auto save?:

@jjwood1600 and I have both run into instances where our computers lost power and shut down while studio was creating an autosave, corrupting it in the process. I assume what happens is that studio deletes the existing autosave, creates a blank .rbxl file, and then starts writing the autosave to it. When the computer shuts off during that process, it’s no surprise that the autosave is corrupted because it wasn’t finished off properly. This can be problematic because since the previous autosave was deleted, we have to start back from when our save file or site-published place was last updated.

Studio should create and write to a temporary file elsewhere for autosaves, move the new autosave over to the autosaves folder, and only once both of those are done, delete the old autosave. This could prevent what happened to jjwood and I from occurring. Of course, I have no understanding whatsoever of how file reading/writing works at a lower level, so this could all be wrong.

5 Likes

Honestly I’d be totally fine with every autosave having its own file until I clear it or roblox clears it after x time. I already save as every time I add something to my game. I stopped trusting roblox saves a long time ago. This is just for my main game atm:

Had to rely on the autosave 5 times and came up with nothing 5 times.

I would like autosave to be in order this way, because I have been in a similar issue instead of power loss my PC crashed randomly and it so happened to be during the process of autosaving. So the file was corrupted and I lost many hours of work.