- if (fp && !use_mailcap && a->filename) {
- /* recv case */
- m_strcpy(pagerfile, sizeof(pagerfile), a->filename);
- mutt_adv_mktemp (NULL, pagerfile, sizeof (pagerfile));
- }
- else
- mutt_mktemp (pagerfile);
+ /* recv case */
+ pagerfd = m_tempfd(pagerfile, sizeof(pagerfile), NONULL(Tempdir),
+ fp && !use_mailcap ? a->filename : NULL);