summaryrefslogtreecommitdiff
path: root/Mailman/Version.py
diff options
context:
space:
mode:
authorbwarsaw2002-08-13 14:33:32 +0000
committerbwarsaw2002-08-13 14:33:32 +0000
commit5aa88aadb141f4df5860bd4c6a82951ced75a01b (patch)
tree8dff19cf82d2a1849d848d610668d44aa8a55160 /Mailman/Version.py
parent556c849e09d080fca8fc076703dc4a7a7fff7819 (diff)
downloadmailman-5aa88aadb141f4df5860bd4c6a82951ced75a01b.tar.gz
mailman-5aa88aadb141f4df5860bd4c6a82951ced75a01b.tar.zst
mailman-5aa88aadb141f4df5860bd4c6a82951ced75a01b.zip
Rework the directory layout for attachments. There were two problems
with the old approach, as pointed out by Michael Meltzer: - it was broken <wink> - it was still susceptible to inode overload The fixes are to put attachments one more directory level down, where the path is archives/private/<listname>/attachments/<YYYYMMDD>/<msgidhash> where YYYYMMDD is the date of the message encoded as 8 digits, and the msgidhash is the first 2 and last 2 octets of the sha hash of the outer message's Message-ID. Any name collisions inside that directory (e.g. a message that contains two images with the same filename), are resolved by finding a unique filebase extension. Specific changes include: calculate_attachments_dir(): Factor out the calculate of the attachments directory so that e.g. Michael can use it in his MimeDel.py hacks. process(): Be sure to pass the appropriate arguments to save_attachment() based on its new signature. makedirs(): Factor out the creation and mod settings of the attachment dir, and all subdirs. save_attachment(): Pass the attachments directory in the arguments. Fix calculation of the url and the saving of the attachment data.
Diffstat (limited to 'Mailman/Version.py')
0 files changed, 0 insertions, 0 deletions