X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib.c;h=56d78b50c2685b125bc2b42b2609ae056b5cb9df;hb=1d7238dc43311c4545883dc1151bf5b142d88c0b;hp=33d57571e3b8e9d07d89137bdf50096c053a559a;hpb=ce2c6b74b93777c66708ef0cfb7cc14ff1bf6a94;p=apps%2Fmadmutt.git diff --git a/lib.c b/lib.c index 33d5757..56d78b5 100644 --- a/lib.c +++ b/lib.c @@ -38,6 +38,8 @@ #include "lib.h" +extern short Umask; + void mutt_nocurses_error (const char *fmt, ...) { va_list ap; @@ -381,6 +383,8 @@ int safe_open (const char *path, int flags) */ FILE *safe_fopen (const char *path, const char *mode) { + /* first set the current umask */ + umask(Umask); if (mode[0] == 'w') { int fd;