Wrong Attachment gets deleted

I’m sending attachments and enabled the feature with the following two lines in config.php

define(“ALLOW_ATTACHMENTS”,1);
$attachment_repository = ‘/var/www/html/lists/attachments’;

Everything works fine, except for the fact that when I add a new attachment, or delete an existing one, some of the attachments disappear from the repository.

There is a table in MySQL called phplist_attachment, in which every attachment gets an ID, a filename (like it is stored in the repository) and the so called remotefile, which is the “actual filename”.

I just chose to delete the attachment with the ID 38 from within PHP List (opened the campaign, changed to attachment and deleted it). In the phplist_attachment database nothing changes, but in the repository the file with the ID 37 got deleted!

I can reproduce that error. So whatever attachment I delete, it actually deletes the file from the repository, which has the ID below the one I wanted to delete.

Does no one else have that problem?