sync_mailbox() did not update the msg struct when flags were changed,
causing the expunge command to fail remove bogus strfcpy() line
This commit is contained in:
parent
8c8f6916c6
commit
2f2b123d71
|
@ -278,7 +278,6 @@ maildir_open (const char *path, int flags)
|
||||||
/* determine the UID for this message. The basename (sans
|
/* determine the UID for this message. The basename (sans
|
||||||
* flags) is used as the key in the db
|
* flags) is used as the key in the db
|
||||||
*/
|
*/
|
||||||
strfcpy (buf, p->file, sizeof (buf));
|
|
||||||
key.dptr = p->file;
|
key.dptr = p->file;
|
||||||
s = strchr (key.dptr, ':');
|
s = strchr (key.dptr, ':');
|
||||||
key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
||||||
|
|
10
sync.c
10
sync.c
|
@ -220,7 +220,17 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
|
||||||
(cur->flags & D_DELETED) ? "T" : "");
|
(cur->flags & D_DELETED) ? "T" : "");
|
||||||
|
|
||||||
if (rename (path, newpath))
|
if (rename (path, newpath))
|
||||||
|
{
|
||||||
perror ("rename");
|
perror ("rename");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* update the filename in the msg struct */
|
||||||
|
p=strrchr(newpath,'/');
|
||||||
|
free(cur->file);
|
||||||
|
cur->file=strdup(p+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user