Followup [was New bug: attachments are not being overwritten]

---------

From: Jose Kahan (jose.kahan@w3.org)
Date: Tue Jul 29 2003 - 11:41:22 CDT


The problem is in parse.c, lime 2392-2398:

--------
#ifdef O_BINARY
#define OPENBITMASK O_WRONLY | O_CREAT | O_BINARY
#else
#define OPENBITMASK O_WRONLY | O_CREAT
#endif
                            if (binname) {
                                binfile = open(binname, OPENBITMASK,
                                set_filemode);
------

O_CREAT won't create a file if it already existsi, at least under Linux
and Solaris 5.8:

-------
O_CREAT
    Create the file if it does not exist. This flag
    requires that the mode argument be specified.

    If the file exists, this flag has no effect except as
    noted under O_EXCL below.
------

Using or not using the hypermail overwrite option produces the
same behavior for attachments.

The solution is either to unlink the file if it already exists or remove
the O_CREAT flag and use a chmod afterwards to set the access rights.

Which solution shall we adopt?

-jose


---------

This archive was generated by hypermail 2.1.7.