Well, I don't *think* it's forbidden by anything... but it's certainly inadvisable.
I agree with you but email is the land of inadvisable nowadays :)
>Nonetheless, being smarter is never a bad thing for a program AFAIK... so your suggestion of how to avoid this seems moderately reasonable to me.
Except for... Where would someone decide to place the info inside the name? -- Should it go before the final extension? ...before the first extension? Maybe in front of the entire file name (ick)? What if there is no extension? ...appending "1.1" in that case would create a ".1" extension which could easily confuse any number of programs.
Using the "MIME reference tags" as the unique part doesn't sound as failproof to me in fact. I am not sure about this but filenames with "MIME reference tags" attached might not get unique even "MIME reference tags" being unique.
As the only way to get fully automatic attachments extraction from reformime is using -xPREFIX I am thinking about including some kind of counter between the PREFIX and the filename. Eight hexa digits would suffice. And if would also be easy to get the original filename if this became necessary (just remove length(PREFIX) + 8 characters from each filename). What do you think?
I believe we should also implement an extra option flag for reformime so users would, by default, get the present behaviour. I am thinking about -u for unique.
I suggest that the "how" of adding the information would need to be hashed out a bit before anything is done in this regard.
Personally, I've always liked the way many Mac OS programs typically handle this. (Other systems probably do much the same thing, but I'm most familiar with Mac OS apps.) They will typically save the first instance with the name exactly as given. After that, if another file would be written with the same "name.ext", the program instead writes it out to "name 1.ext" or "name-1.ext" to avoid conflicts. Of course, a third instance would be written to "name-2.ext", and so on.
As the -xPREFIX is all about automatic processing (-x is the interactive mode which doesn't suffer from the duplicate name plague) I believe such a solution would make harder to get the original filename automatically.
And it might also have uniqueness problems as the "MIME reference tags".
Besides this solution it is a bit harder to code :)
Rodrigo Severo
-- ---------------------------------------------------- Rodrigo Severo Fábrica de Idéias Fone: +55(61)321 1357 Fax: +55(61)223 1712 SBS - Quadra 2 - Ed. Empire Center - Sala 1301 Brasília/DF - Brasil CEP: 70.070-904 ----------------------------------------------------
------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users