#2668 closed defect (fixed)
passing path to checkout to update() causes data file to be destroyed
Reported by: | sascha_silbe | Owned by: | sascha_silbe |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Critical | Keywords: | 11.2.0 |
Cc: | Distribution/OS: | OLPC | |
Bug Status: | Assigned |
Description
If we call datastore.get() and pass the file name back into datastore.update() for the same entry with transfer_ownership set to False, the data file will get destroyed.
This is because source and destination file are identical (hard links) and we overwrite the destination file in AsyncCopy.start() without unlinking it first.
Change History (6)
comment:1 Changed 13 years ago by erikos
comment:2 Changed 13 years ago by erikos
Testcase:
- open Record and take a photo
- switch to the Journal and wait for the picture entry to appear
- go back to Record
- rename the photo
- close Record
- open the photo in Imageviewer / open the Record session and show the picture
comment:3 Changed 13 years ago by erikos
- Distribution/OS set to OLPC
- Keywords 11.2.0 added
comment:4 Changed 12 years ago by erikos
- Resolution set to fixed
- Status changed from new to closed
Did land, closing. QA happens on http://dev.laptop.org/ticket/10957
comment:5 Changed 10 years ago by dnarvaez
- Component changed from sugar-datastore to Sugar
Note: See
TracTickets for help on using
tickets.
Secondary information: http://lists.sugarlabs.org/archive/sugar-devel/2011-March/030264.html