Explorar o código

ensure that mailbox creation in maildir_store() is limited to trashing

other mailboxes would have been maildir_select()ed already.
Oswald Buddenhagen %!s(int64=13) %!d(string=hai) anos
pai
achega
8121224744
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/drv_maildir.c

+ 1 - 1
src/drv_maildir.c

@@ -1101,7 +1101,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash,
 	maildir_make_flags( data->flags, fbuf );
 	nfsnprintf( buf, sizeof(buf), "%s%s/tmp/%s%s", prefix, box, base, fbuf );
 	if ((fd = open( buf, O_WRONLY|O_CREAT|O_EXCL, 0600 )) < 0) {
-		if (errno != ENOENT) {
+		if (errno != ENOENT || !to_trash) {
 			sys_error( "Maildir error: cannot create %s", buf );
 			free( data->data );
 			cb( DRV_BOX_BAD, 0, aux );