Changeset 4131:287b90895158

Show
Ignore:
Timestamp:
2005-08-02 07:39:56 (3 years ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

In compose menu, detach should be able to unlink files generated by mutt,
but not files that existed before.

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • compose.c

    r4118 r4131  
    687687            char *att = files[i]; 
    688688            idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR)); 
     689            idx[idxlen]->unowned = 1; 
    689690            idx[idxlen]->content = mutt_make_file_attach (att); 
    690691            if (idx[idxlen]->content != NULL) 
     
    815816      case OP_DELETE: 
    816817        CHECK_COUNT; 
    817         idx[menu->current]->content->unlink = 0; 
     818        if (idx[menu->current]->unowned) 
     819          idx[menu->current]->content->unlink = 0; 
    818820        if (delete_attachment (menu, &idxlen, menu->current) == -1) 
    819821          break; 
  • mutt.h

    r4098 r4131  
    856856  int level; 
    857857  int num; 
     858  unsigned int unowned : 1;   /* don't unlink on detach */ 
    858859} ATTACHPTR; 
    859860