Browse Source

unscrew file naming scheme

0.9
Oswald Buddenhagen 21 years ago committed by Oswald Buddenhagen
parent
commit
6f4653aa87
  1. 6
      src/sync.c

6
src/sync.c

@ -34,7 +34,7 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
static unsigned int MaildirCount = 0; static unsigned int MaildirCount;
message_t * message_t *
find_msg (message_t * list, unsigned int uid) find_msg (message_t * list, unsigned int uid)
@ -330,8 +330,8 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
for (;;) for (;;)
{ {
/* create new file */ /* create new file */
snprintf (path, sizeof (path), "%s/tmp/%ld_%d.%d.%s%s", snprintf (path, sizeof (path), "%s/tmp/%ld.%d_%d.%s%s",
mbox->path, time (0), MaildirCount++, getpid (), mbox->path, time (0), getpid (), MaildirCount++,
Hostname, suffix); Hostname, suffix);
if ((fd = open (path, O_WRONLY | O_CREAT | O_EXCL, 0600)) > 0) if ((fd = open (path, O_WRONLY | O_CREAT | O_EXCL, 0600)) > 0)

Loading…
Cancel
Save