From: David Levine Date: Thu, 30 Oct 2014 00:37:18 +0000 (-0500) Subject: Added initial "MH-Profile-Version: 1.0\n" line to newly created X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/5ebbe3582d5cdd4c225ed04205a7b088ca6e72a6?hp=6cc9e85e73ff6f6c67ae6e645d184bbf57ecc2f0 Added initial "MH-Profile-Version: 1.0\n" line to newly created profiles. The main purpose of this first line is to fool file(1). Without it, if the first line of the profile is Path:, file 5.19 reports its type as message/news. With it, it reports the type as text/plain. --- diff --git a/uip/install-mh.c b/uip/install-mh.c index 2240f870..ce8e2940 100644 --- a/uip/install-mh.c +++ b/uip/install-mh.c @@ -208,6 +208,13 @@ query: */ if ((out = fopen (defpath, "w")) == NULL) adios (defpath, "unable to write"); + /* + * The main purpose of this first line is to fool file(1). + * Without it, if the first line of the profile is Path:, + * file 5.19 reports its type as message/news. With it, + * it reports the type as text/plain. + */ + fprintf (out, "MH-Profile-Version: 1.0\n"); for (np = m_defs; np; np = np->n_next) { if (!np->n_context) fprintf (out, "%s: %s\n", np->n_name, np->n_field);