imap/mailbox.c:3984:20: error: 'spoolfname' undeclared (first use in this function)
unlink(spoolfname);
static void mailbox_record_cleanup(struct mailbox *mailbox,
struct index_record *record)
{
#if defined ENABLE_OBJECTSTORE
if (config_getswitch(IMAPOPT_OBJECT_STORAGE_ENABLED)) {
/* we always remove the spool file here, because we've archived it */
if (record->system_flags & FLAG_INTERNAL_ARCHIVED)
unlink(spoolfname);
/* if the record is also deleted, we remove the objectstore copy */
if (record->system_flags & FLAG_INTERNAL_UNLINKED)
objectstore_delete(mailbox, record);
return;
}
#endif
.....
/* file is still alive - check if there's anything to clean up */
const char *spoolfname = mailbox_spool_fname(mailbox, record->uid);
......
How can I correct this? Simply move this last line at the function start before the define?
Gabriele