New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ever overwrite or delete recover files #2174

Closed
unfa opened this Issue Jul 9, 2015 · 7 comments

Comments

Projects
None yet
5 participants
@unfa
Contributor

unfa commented Jul 9, 2015

I just lost some serious progress because I closed LMMS after recovering from a crash and forgot to save the project. LMMS deleted the recover.mmpz file and my progress is lost forver. It'd be great if it didn't do that, and name the recover files with Process ID and date like this:

recover_PID7632_2015-07-09-1348.mmpz

It'd make all recover files be there if needed. They are not very big, could be automatically removed after a month or something. That'd greatly increase the crash recovery probability and make it resistant to running multiple LMMS instances that overwrite recorver.mmpz causing data loss.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 9, 2015

Member

Ouch! Sorry about your data loss. Been there...

The line removing the recovery file is here:
https://github.com/LMMS/lmms/blob/master/src/gui/MainWindow.cpp#L1259

How does other programs do it?
I can recall seeing recovery files popping up in other programs and they would make some "noise" like adding a red border saying recovery file. I think a good way to deal with this would be to just add the usual question on closing. If I modify a new project and press 'close' I get "The current project was modified since last saving. Do you want to save it now?"
Maybe something like: "You are about to close a recovered file but it is currently in an unsaved state and will be lost if you don't save it. Do you want to save it now?"

Member

zonkmachine commented Jul 9, 2015

Ouch! Sorry about your data loss. Been there...

The line removing the recovery file is here:
https://github.com/LMMS/lmms/blob/master/src/gui/MainWindow.cpp#L1259

How does other programs do it?
I can recall seeing recovery files popping up in other programs and they would make some "noise" like adding a red border saying recovery file. I think a good way to deal with this would be to just add the usual question on closing. If I modify a new project and press 'close' I get "The current project was modified since last saving. Do you want to save it now?"
Maybe something like: "You are about to close a recovered file but it is currently in an unsaved state and will be lost if you don't save it. Do you want to save it now?"

@unfa

This comment has been minimized.

Show comment
Hide comment
@unfa

unfa Jul 9, 2015

Contributor

Thanks, I managed to redo it more or less. Anyway, I'd like to expand the autosave funcionality a bit.

Contributor

unfa commented Jul 9, 2015

Thanks, I managed to redo it more or less. Anyway, I'd like to expand the autosave funcionality a bit.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 9, 2015

Member

OK. I'm going to look into how recover files are handled.

Member

zonkmachine commented Jul 9, 2015

OK. I'm going to look into how recover files are handled.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 9, 2015

Member

Post edited!

Method to reproduce goes something like:

  • In master, put a project file "recover.mmp" in the working directory ~/lmms
  • Start LMMS
  • Close LMMS
    The recover.mmp file is gone, no questions asked. This is definitely a bit on the brutal side.
Member

zonkmachine commented Jul 9, 2015

Post edited!

Method to reproduce goes something like:

  • In master, put a project file "recover.mmp" in the working directory ~/lmms
  • Start LMMS
  • Close LMMS
    The recover.mmp file is gone, no questions asked. This is definitely a bit on the brutal side.
@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 9, 2015

Member

I'm going to hack this a bit to give us a question box on closing a recovery file.

Member

zonkmachine commented Jul 9, 2015

I'm going to hack this a bit to give us a question box on closing a recovery file.

@musikBear

This comment has been minimized.

Show comment
Hide comment
@musikBear

musikBear Jul 10, 2015

so sad @unfa - if you had seen what i suggested the other day
#181
you would have liked it
I reference to 181 because i think it has very strong relation to this thread, and the handling of recover in a whole

musikBear commented Jul 10, 2015

so sad @unfa - if you had seen what i suggested the other day
#181
you would have liked it
I reference to 181 because i think it has very strong relation to this thread, and the handling of recover in a whole

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jan 19, 2016

Member

Closed via #2176

Member

tresf commented Jan 19, 2016

Closed via #2176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment