Projects get deleted from the filesystem

Bug #1031805 reported by Aija on 2012-08-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jokosher
Medium
Aija

Bug Description

First case:
1. Create a new project
2. Edit the project (e.g., add an instrument)
3. Press File->Save
4. Quit Jokosher
5. Open Jokosher
6. The new project is not found on recent project list and is deleted from the filesystem.

Second case:
1.-3. as above
4. Close the project
5. The new project is in recent project list
6. Try to open it and get error: The project:
[project location]/project.jokosher
does not exist.
7. After exiting and opening Jokosher the project from the list is gone (which is fine).

The projects does not get lost if I ommit step 3: Pressing "Save". That is, if I press "Save", the project during quiting/closing gets deleted.

Related branches

Aija (ajaunteva) on 2012-08-04
Changed in jokosher:
assignee: nobody → Aija (ajaunteva)
status: New → Confirmed
Aija (ajaunteva) wrote :

The reason why it happens lies in these lines:

if self.project.CheckUnsavedChanges():
 self.OnSaveProject()
 self.project.CloseProject()
elif self.project.newly_created_project:
 self.project.CloseProject()
 ProjectManager.DeleteProjectLocation(self.project)
else:
 self.project.CloseProject()

The project is deleted if it is newly_created_project. However, if this new project has unsaved changes then the first "if" passes and the project is saved and closed. If I press Save as described previously then CheckUnsavedChanges() is false and it goes to the next statement which is true (it still is a new project) and get the project deleted.

So, in Project.SaveIncrementalAction added self.newly_created_project = False, thus, after any changes that calls this function will turn project in "old".
Only projects that are "empty" (nothing is done there after opening) will be deleted.
If there are some actions that still result in deleted projects, then it is most likely that it lacks call to SaveIncrementalAction which might be an another bug.

Changed in jokosher:
status: Confirmed → Fix Committed
Changed in jokosher:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers