52 if (mhata && mhata->
umask)
55 struct stat st = { 0 };
62 return 0777 & ~st.st_mode;
79 mode_t old_umask = umask(new_umask);
84 snprintf(path,
sizeof(path),
"%s/.neomutt-%s-%d-%" PRIu64,
mailbox_path(m),
86 fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666);
106 *fp = fdopen(fd,
"w");
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
char * ShortHostname
Short version of the hostname.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG3
Log at debug level 3.
@ LL_DEBUG1
Log at debug level 1.
struct MhMboxData * mh_mdata_get(struct Mailbox *m)
Get the private data for this Mailbox.
bool mh_mkstemp(struct Mailbox *m, FILE **fp, char **tgt)
Create a temporary file.
mode_t mh_umask(struct Mailbox *m)
Create a umask from the mailbox directory.
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
Notmuch-specific Mailbox data.
uint64_t mutt_rand64(void)
Create a 64-bit random number.
Mh-specific Mailbox data -.
mode_t umask
umask to use when creating files