]> granicus.if.org Git - mutt/commitdiff
Remove unnecessary strcmp for mutt_view_attachment().
authorKevin McCarthy <kevin@8t8.us>
Sat, 22 Jun 2019 19:54:40 +0000 (12:54 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sat, 22 Jun 2019 19:54:40 +0000 (12:54 -0700)
mutt_rfc1524_expand_filename() runs the result through
mutt_adv_mktemp(), which will sanitize and relocate the filename under
$tmpdir.  The strcmp() is unneeded and distracting to the program
logic; none of the other routines perform or need this check.

attach.c

index 04a5610b0ade675e37be5b7dfc602415c9c92444..552a1767abf188c4c8a7e75419ae241e21968c57 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -415,7 +415,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
     if (mutt_rfc1524_expand_filename (entry->nametemplate, fname,
                                       tempfile))
     {
-      if (fp == NULL && mutt_strcmp(mutt_b2s (tempfile), a->filename))
+      if (fp == NULL)
       {
        /* send case: the file is already there */
        if (safe_symlink (a->filename, mutt_b2s (tempfile)) == -1)