}
/* keepalive failure in mutt_enter_fname may kill connection. #3028 */
- if (Context && !Context->mailbox->path)
+ if (Context && (Context->mailbox->path[0] == '\0'))
mutt_context_free(&Context);
if (Context)
int monitor_remove_rc = mutt_monitor_remove(NULL);
#endif
#ifdef USE_COMPRESSED
- if (Context->mailbox->compress_info && Context->mailbox->realpath)
+ if (Context->mailbox->compress_info &&
+ (Context->mailbox->realpath[0] != '\0'))
new_last_folder = mutt_str_strdup(Context->mailbox->realpath);
else
#endif
check = mx_mbox_check(Context, &index_hint);
if (check < 0)
{
- if (!Context->mailbox->path)
+ if (Context->mailbox->path[0] == '\0')
{
/* fatal error occurred */
mutt_context_free(&Context);
}
/* check for a fatal error, or all messages deleted */
- if (!Context->mailbox->path)
+ if (Context->mailbox->path[0] == '\0')
mutt_context_free(&Context);
/* if we were in the pager, redisplay the message */
cp = _("Open mailbox");
buf[0] = '\0';
- if ((op == OP_MAIN_NEXT_UNREAD_MAILBOX) && Context && Context->mailbox->path)
+ if ((op == OP_MAIN_NEXT_UNREAD_MAILBOX) && Context &&
+ (Context->mailbox->path[0] != '\0'))
{
mutt_str_strfcpy(buf, Context->mailbox->path, sizeof(buf));
mutt_pretty_mailbox(buf, sizeof(buf));
#endif
else
{
- if (ChangeFolderNext && Context && Context->mailbox->path)
+ if (ChangeFolderNext && Context &&
+ (Context->mailbox->path[0] != '\0'))
{
mutt_str_strfcpy(buf, Context->mailbox->path, sizeof(buf));
mutt_pretty_mailbox(buf, sizeof(buf));
}
/* check to see if the folder is the currently selected folder before polling */
- if (!Context || !Context->mailbox->path ||
+ if (!Context || (Context->mailbox->path[0] == '\0') ||
((tmp->magic == MUTT_IMAP ||
#ifdef USE_NNTP
tmp->magic == MUTT_NNTP ||
default:; /* do nothing */
}
}
- else if (CheckMboxSize && Context && Context->mailbox->path)
+ else if (CheckMboxSize && Context && (Context->mailbox->path[0] != '\0'))
tmp->size = (off_t) sb.st_size; /* update the size of current folder */
#ifdef USE_SIDEBAR
mutt_file_fclose(&mdata->fp);
/* fix up the times so mailbox won't get confused */
- if (ctx->peekonly && ctx->mailbox->path &&
+ if (ctx->peekonly && (ctx->mailbox->path[0] != '\0') &&
(mutt_timespec_compare(&ctx->mailbox->mtime, &mdata->atime) > 0))
{
#ifdef HAVE_UTIMENSAT
check = mx_mbox_check(Context, &index_hint);
if (check < 0)
{
- if (!Context->mailbox->path)
+ if (Context->mailbox->path[0] == '\0')
{
/* fatal error occurred */
mutt_context_free(&Context);
col = div_width;
mutt_window_move(MuttSidebarWindow, row, col);
- if (Context && Context->mailbox->realpath &&
+ if (Context && (Context->mailbox->realpath[0] != '\0') &&
(mutt_str_strcmp(m->realpath, Context->mailbox->realpath) == 0))
{
#ifdef USE_NOTMUCH
else
#endif
#ifdef USE_COMPRESSED
- if (Context && Context->mailbox->compress_info && Context->mailbox->realpath)
+ if (Context && Context->mailbox->compress_info &&
+ (Context->mailbox->realpath[0] != '\0'))
{
mutt_str_strfcpy(tmp, Context->mailbox->realpath, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));
}
else
#endif
- if (Context && Context->mailbox->path)
+ if (Context && (Context->mailbox->path[0] != '\0'))
{
mutt_str_strfcpy(tmp, Context->mailbox->path, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));