Projects get deleted from the filesystem
Bug #1031805 reported by
Aija
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Jokosher |
Fix Committed
|
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]
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
lp:~ajaunteva/jokosher/gui_issues
- Pēteris Krišjānis: Approve
-
Diff: 11 lines (+1/-0)1 file modifiedJokosher/Project.py (+1/-0)
Changed in jokosher: | |
assignee: | nobody → Aija (ajaunteva) |
status: | New → Confirmed |
Changed in jokosher: | |
importance: | Undecided → Medium |
To post a comment you must log in.
The reason why it happens lies in these lines:
if self.project. CheckUnsavedCha nges(): ject() CloseProject( ) newly_created_ project: CloseProject( ) .DeleteProjectL ocation( self.project) CloseProject( )
self.OnSavePro
self.project.
elif self.project.
self.project.
ProjectManager
else:
self.project.
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 CheckUnsavedCha nges() 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. SaveIncremental Action added self.newly_ created_ project = False, thus, after any changes that calls this function will turn project in "old". Action which might be an another bug.
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 SaveIncremental