Commit 909e2f61 909e2f61d89e8f6d0a3e6d29b50b74c71bbed660 by Sergey Poznyakoff

(maildir_message_name): Return NULL for deleted messages.

1 parent 570a247f
...@@ -338,7 +338,12 @@ char * ...@@ -338,7 +338,12 @@ char *
338 maildir_message_name (struct _amd_message *amsg, int deleted) 338 maildir_message_name (struct _amd_message *amsg, int deleted)
339 { 339 {
340 struct _maildir_message *msg = (struct _maildir_message *) amsg; 340 struct _maildir_message *msg = (struct _maildir_message *) amsg;
341 return maildir_mkfilename (amsg->amd->name, msg->newflag ? NEWSUF : CURSUF, msg->file_name); 341 if (deleted)
342 return NULL; /* Force amd.c to unlink the file.
343 FIXME: We could also add a 'T' info to it. Should
344 we have an option deciding which approach to take? */
345 return maildir_mkfilename (amsg->amd->name,
346 msg->newflag ? NEWSUF : CURSUF, msg->file_name);
342 } 347 }
343 348
344 static void 349 static void
......