X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=102329da54f385e689b1b1981ca8eaaab4f4bf4c;hp=a49749bcba6a327537fe8524e0d6fe847c429161;hb=120c10f07176befeaf5766ae73509619a5a5ad53;hpb=3d937534e7b1ee723f86594b5e4c64c95158a933 diff --git a/attach.c b/attach.c index a49749b..102329d 100644 --- a/attach.c +++ b/attach.c @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "mutt.h" #include "mutt_menu.h" #include "mutt_curses.h" @@ -729,8 +733,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"); }