rudraksh125 / android-crawler

Automatically exported from code.google.com/p/android-crawler
0 stars 0 forks source link

Async crash can corrupt backup files #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When a crash occurrs while backup is being performed, the resulting file will 
be truncated and the subsequent resume will fail.
This can be avoided by writing on a temporary file and then switching the two 
copies, or by using a separated service to write on disk.

Original issue reported on code.google.com by nofatclips on 4 Dec 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Fixed in r108 by creating a temporary copy of the orignal file. If the new file 
is created successfully, the copy is deleted. Otherwise, at resume time, the 
new file is deleted and the copy used instead.

Original comment by nofatclips on 7 Dec 2011 at 3:40