Incorrect (and ancient code) would accidentally clobber the wrong attachment

(and only one, rather than all) when deleting a message.
This commit is contained in:
Jesse Vincent 2010-01-03 23:23:13 +00:00
parent 483655fa20
commit 6caec1100c

View file

@ -2267,7 +2267,7 @@ public class LocalStore extends Store implements Serializable
/*
* Delete all of the messages' attachments to save space.
*/
mDb.execSQL("DELETE FROM attachments WHERE id = ?",
mDb.execSQL("DELETE FROM attachments WHERE message_id = ?",
new Object[]
{
mId