Menu

#1700 Cannot recover autosaved 'unsaved' file

None
open
nobody
None
5
2024-08-01
2024-08-01
Lorenzo
No

If autosave is switched on, Rosegarden autosaves a file in the $HOME/.local/share/rosegarden/autosave directory even if the file is 'unsaved' (and some editing activity has been going on so that the status is 'unsaved' meaning when you have an asterisk shown in the main window title).

Essentially imagine starting Rosegarden and working with it but not saving explicitly.
This has a use case if (how sometimes happen) you don't save a project right away because you're just experimenting or whatnot.

However if I 'crash' (kill) rosegarden and start it up again no clue is provided about an auto-save file. Note that the actual autosave file is created in the above directory

Discussion

  • Ted Felix

    Ted Felix - 2024-08-01
    • summary: Canont recover autosaved 'unsaved' file --> Cannot recover autosaved 'unsaved' file
     
  • Ted Felix

    Ted Felix - 2024-08-01

    Did some analysis on this one and found the key parts involved. There are some complications related to using the current directory to hash the autosave filename. To get around this, I'm thinking we should add special handling for "Untitled":

    • Autosave for Untitled should be named "Untitled". No hashing.
      • AutoSaveFinder::getAutoSavePath()
    • Check for an "Untitled" autosave on autoload.rg load and force recovery.
      • RosegardenDocument::performAutoload() is probably too deep. It is called for many reasons other than startup.
      • RosegardenMainWindow::newDocument() also seems too deep. It is called for many reasons other than startup.
      • RosegardenMainWindow's ctor would probably be best. Before it calls newDocument(), it should check for an Untitled autosave and force the user to accept or delete it.
    • Make sure the Untitled autosave is deleted the moment we save or exit. I suspect this is just normal behavior and should come along for the ride.

    Just some thoughts. If there's a better way, we should do it.

     

Log in to post a comment.