On Tue, Oct 07, 2008 at 01:12:32 +0200, Ben Franksen wrote: > ...or so I thought. I find the code in Darcs.Command.Send resp > Darcs.Externals.hs very, ahem, hard to understand.
I have always wondered if there was some way we could clean up this function. I have a sneaking suspicion that its arguments list is complicated because of how we call it, and how we call it is complicated of the arguments list... i.e. that there is some sort of self-cancelling complexity that we can work on between the two functions. Maybe one good refactor would be to generateEmail to a document instead of to a handle. I think Florent might be interested in that too. > Anyway, I /think/ there is a problem in sendEmailDoc calling execSendmail, > because execSendmail gets a 'fn' argument (last arg) and a /different/ > filename (from yet another invocation of withtempFile) via the ftable > (index 'a' which I suppose is connected to the %a replacement), /if/ > mbundle is not Nothing. There are all-too-many withTempFile calls there and > I think filenames for all these temp files got badly mixed up somehow... So two temp files get created, as I can see. The 'fn' file is written to by generateEmail, and the 'a' file contains just the bundle. -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
pgpOl4v6bf5h3.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
