X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=d4a3cedc2e60e3f8a34851f10ec022e8af2c3db9;hp=a49749bcba6a327537fe8524e0d6fe847c429161;hb=4a9d00d99a1b6b24a9fcc8eb604dc3812b2782b8;hpb=3d937534e7b1ee723f86594b5e4c64c95158a933 diff --git a/attach.c b/attach.c index a49749b..d4a3ced 100644 --- a/attach.c +++ b/attach.c @@ -729,8 +729,11 @@ mutt_save_attachment_open (char *path, int flags) { if (flags == M_SAVE_APPEND) return fopen (path, "a"); + /* be sure not to change the following fopen to safe_fopen + * as safe_fopen returns w/ an error if path exists + */ if (flags == M_SAVE_OVERWRITE) - return safe_fopen (path, "w"); /* __FOPEN_CHECKED__ */ + return fopen (path, "w"); /* __FOPEN_CHECKED__ */ return safe_fopen (path, "w"); }