summaryrefslogtreecommitdiffstats
path: root/attach.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2007-03-21 11:26:38 -0700
committerBrendan Cully <brendan@kublai.com>2007-03-21 11:26:38 -0700
commit6620e49d09f185623be85e51f3d836b9ec09c29f (patch)
tree81e180f6cec837f5cceb408de72c1241d84122c2 /attach.c
parent262b2b63b9936f6d7d71ee6ced62e857a64a9606 (diff)
Back out $umask.
Diffstat (limited to 'attach.c')
-rw-r--r--attach.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/attach.c b/attach.c
index 609525d7..8c3edf2e 100644
--- a/attach.c
+++ b/attach.c
@@ -736,21 +736,12 @@ bail:
static FILE *
mutt_save_attachment_open (char *path, int flags)
{
- mode_t omask;
- FILE *fp = NULL;
-
- omask = umask(Umask);
-
if (flags == M_SAVE_APPEND)
- fp = fopen (path, "a");
- else if (flags == M_SAVE_OVERWRITE)
- fp = fopen (path, "w"); /* __FOPEN_CHECKED__ */
- else
- fp = safe_fopen (path, "w");
-
- umask(omask);
-
- return fp;
+ return fopen (path, "a");
+ if (flags == M_SAVE_OVERWRITE)
+ return fopen (path, "w"); /* __FOPEN_CHECKED__ */
+
+ return safe_fopen (path, "w");
}
/* returns 0 on success, -1 on error */