← Back to team overview

openshot.developers team mailing list archive

[Bug 671324] Re: Safety first! Temp file before saving

 

I have just committed some code, which autosaves on an interval or
before each playback / preview attempt.  The way that OpenShot saves
it's actual project file is with the cpickle Python method.  There is no
easy way to save it to a temp file, because if it seg faults the Python
interpreter, OpenShot closes immediately with no way to stop it.

So, I think our new autosave code is a big step in the right direction.

** Changed in: openshot
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of OpenShot
Developers, which is subscribed to OpenShot Video Editor.
https://bugs.launchpad.net/bugs/671324

Title:
  Safety first! Temp file before saving

Status in OpenShot Video Editor:
  Fix Committed

Bug description:
  If one saves a session and OpenShot crashes while writing the project file, everything will be destroyed. A previous (good) version will be overwritten. This is what happend to me.
  Since I lost a whole day of work this week, I came to the following conclusion. When saving a project, OpenShot should write a temporary file first. Then, if the file has been written without errors, it can be copied to the "real" project file. After that (and if there wasn't an error) the temp file can be removed safely. If OpenShot should crash, you've got at least the last good save state.

  Another method would be to write a temp file when opening a project.
  By saving the project, the actions will be committed to the "real"
  project file. After that the temp file can be removed.

  Please add this to the wishlist. Thanks.





References