Changeset 1522:cc8ff850aef0 for browser.c
Legend:
- Unmodified
- Added
- Removed
-
browser.c
r1431 r1522 173 173 case 'f': 174 174 #ifdef USE_IMAP 175 if ( mx_is_imap (folder->ff->name))175 if (folder->ff->imap) 176 176 strfcpy (fn, NONULL(folder->ff->desc), sizeof (fn)); 177 177 else … … 208 208 { 209 209 #ifdef USE_IMAP 210 if (mx_is_imap (folder->ff->name)) 211 { 210 if (folder->ff->imap) 211 { 212 sprintf (permission, "IMAP %c%c", 213 folder->ff->inferiors ? '+' : ' ', 214 folder->ff->selectable ? 'S' : ' '); 212 215 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); 213 snprintf (dest, destlen, tmp, "IMAP");216 snprintf (dest, destlen, tmp, permission); 214 217 } 215 218 #endif … … 329 332 (state->entry)[state->entrylen].desc = safe_strdup (name); 330 333 #ifdef USE_IMAP 331 (state->entry)[state->entrylen].notfolder = 0; 332 #endif 333 334 (state->entry)[state->entrylen].imap = 0; 335 #endif 334 336 (state->entrylen)++; 335 337 } … … 422 424 { 423 425 #ifdef USE_IMAP 424 if ( tmp->path[0] == '{')426 if (mx_is_imap (tmp->path)) 425 427 { 426 428 add_folder (menu, state, tmp->path, NULL, tmp->new); … … 624 626 link_is_dir (LastDir, state.entry[menu->current].name)) 625 627 #ifdef USE_IMAP 626 || state.entry[menu->current]. notfolder628 || state.entry[menu->current].inferiors 627 629 #endif 628 630 ) … … 646 648 if ((mx_get_magic (buf) <= 0) 647 649 #ifdef USE_IMAP 648 || state.entry[menu->current]. notfolder650 || state.entry[menu->current].inferiors 649 651 #endif 650 652 ) … … 682 684 else if (state.imap_browse) 683 685 { 686 int n; 687 684 688 strfcpy (LastDir, state.entry[menu->current].name, 685 689 sizeof (LastDir)); 690 /* tack on delimiter here */ 691 if ((state.entry[menu->current].delim != '\0') && 692 (n = strlen (LastDir)+1) < sizeof (LastDir)) 693 { 694 LastDir[n] = '\0'; 695 LastDir[n-1] = state.entry[menu->current].delim; 696 } 686 697 } 687 698 #endif … … 807 818 808 819 case OP_DELETE_MAILBOX: 809 if (! mx_is_imap (state.entry[menu->current].name))820 if (!state.entry[menu->current].imap) 810 821 mutt_error (_("Delete is only supported for IMAP mailboxes")); 811 822 else … … 1059 1070 } 1060 1071 1072 #ifdef USE_IMAP 1073 if (state.entry[menu->current].selectable) 1074 { 1075 strfcpy (f, state.entry[menu->current].name, flen); 1076 destroy_state (&state); 1077 mutt_menuDestroy (&menu); 1078 return; 1079 } 1080 else 1081 #endif 1061 1082 if (S_ISDIR (state.entry[menu->current].mode) || 1062 1083 (S_ISLNK (state.entry[menu->current].mode) &&
