[Sugar-devel] [PATCH sugar-datastore 3/3] don't destroy unchanged data store entries (SL#2668)

Simon Schampijer simon at schampijer.de
Tue Mar 29 15:29:22 EDT 2011


On 03/05/2011 03:26 PM, Sascha Silbe wrote:
> Calling datastore.get() and passing the file name back into datastore.update()
> for the same entry with transfer_ownership set to False destroyed the data
> file.
>
> This was because source and destination file are identical (hard links) and we
> overwrote the destination file in AsyncCopy.start() without unlinking it
> first.
>
> Fix this by unlinking the destination file if it exists.

http://bugs.sugarlabs.org/ticket/2668#comment:2

This part of the patch looks good. I added a test case to [1] to make 
sure we can test it accordingly. We should make sure there are no 
regressions.

> Reported-By: Daniel Drake<dsd at laptop.org>
> Signed-off-by: Sascha Silbe<silbe at activitycentral.com>

Acked-by: Simon Schampijer <simon at laptop.org>

Regards,
    Simon

[1] http://bugs.sugarlabs.org/ticket/2668#comment:2


More information about the Sugar-devel mailing list