I did this for a reason: librarian_numbers+attachment_name is unique and you don't have to find out if there's an attachment on the bug that you downloaded already or didn't.
But yeah, a fix could look like this:
* add the bug number to the path name ("%s-%s" % (bugnumber, librariannumber)),
* use information of the buglist.closed set to purge unneeded attachments
* (maybe add a --nopurge command line option or a setting in the config file for people who check closed bugs too *shrug*)
I did this for a reason: librarian_ numbers+ attachment_ name is unique and you don't have to find out if there's an attachment on the bug that you downloaded already or didn't.
But yeah, a fix could look like this:
* add the bug number to the path name ("%s-%s" % (bugnumber, librariannumber)),
* use information of the buglist.closed set to purge unneeded attachments
* (maybe add a --nopurge command line option or a setting in the config file for people who check closed bugs too *shrug*)