Show
Ignore:
Timestamp:
2008-07-02 02:19:14 (5 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Use realpath() in mutt_pretty_mailbox() for paths that may need it.
This requires to add the buffer size as parameter since the result may
be longer than the original but still fit in the buffer. Closes #2948.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • compose.c

    r5358 r5443  
    218218    if(stat(idx[i]->content->filename, &st) != 0) 
    219219    { 
    220       mutt_pretty_mailbox(pretty); 
     220      mutt_pretty_mailbox(pretty, sizeof (pretty)); 
    221221      mutt_error(_("%s [#%d] no longer exists!"), 
    222222                 pretty, i+1); 
     
    226226    if(idx[i]->content->stamp < st.st_mtime) 
    227227    { 
    228       mutt_pretty_mailbox(pretty); 
     228      mutt_pretty_mailbox(pretty, sizeof (pretty)); 
    229229      snprintf(msg, sizeof(msg), _("%s [#%d] modified. Update encoding?"), 
    230230               pretty, i+1); 
     
    569569        if (mutt_get_field ("Fcc: ", buf, sizeof (buf), M_FILE | M_CLEAR) == 0) 
    570570        { 
    571           strfcpy (fcc, buf, _POSIX_PATH_MAX); 
    572           mutt_pretty_mailbox (fcc); 
     571          strfcpy (fcc, buf, fcclen); 
     572          mutt_pretty_mailbox (fcc, fcclen); 
    573573          move (HDR_FCC, HDR_XOFFSET); 
    574574          mutt_paddstr (W, fcc); 
     
    718718          { 
    719719            strfcpy (fname, NONULL (Context->path), sizeof (fname)); 
    720             mutt_pretty_mailbox (fname); 
     720            mutt_pretty_mailbox (fname, sizeof (fname)); 
    721721          } 
    722722 
     
    10061006        CHECK_COUNT; 
    10071007        strfcpy (fname, idx[menu->current]->content->filename, sizeof (fname)); 
    1008         mutt_pretty_mailbox (fname); 
     1008        mutt_pretty_mailbox (fname, sizeof (fname)); 
    10091009        if (mutt_get_field (_("Rename to: "), fname, sizeof (fname), M_FILE) 
    10101010                                                        == 0 && fname[0]) 
     
    11951195       { 
    11961196         strfcpy (fname, NONULL (Context->path), sizeof (fname)); 
    1197          mutt_pretty_mailbox (fname); 
     1197         mutt_pretty_mailbox (fname, sizeof (fname)); 
    11981198       } 
    11991199       if (idxlen)