Fixed mhstore to honor nmh-storage profile entry even with -auto [Bug #35303].
authormarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 13:11:24 +0000 (15:11 +0200)
committermarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 13:11:24 +0000 (15:11 +0200)
Pulled in from nmh. Thanks to David Levine.

man/mhstore.man1
uip/mhstore.c

index f05c10c..ec4c7a1 100644 (file)
@@ -218,7 +218,9 @@ to store the content.  If the formatting string starts with a '/',
 then the content will be stored in the full path given, else the
 file name will be relative to the value of \*(lqnmh-storage\*(rq or
 the current working directory.  Any escapes (given below) will be
 then the content will be stored in the full path given, else the
 file name will be relative to the value of \*(lqnmh-storage\*(rq or
 the current working directory.  Any escapes (given below) will be
-expanded, except for the a-escape.
+expanded, except for the a-escape.  Note that if \*(lqnmh-storage\*(rq
+is not an absolute path, it will be relative to the folder that
+contains the message(s).
 .PP
 A command or pathname formatting string may contain the following
 escapes.  If the content isn't part of a multipart (of any subtype
 .PP
 A command or pathname formatting string may contain the following
 escapes.  If the content isn't part of a multipart (of any subtype
index 764237e..cb411d8 100644 (file)
@@ -438,7 +438,7 @@ store_all_messages(CT *cts)
        */
        if (autosw)
                dir = getcpy(cwd);
        */
        if (autosw)
                dir = getcpy(cwd);
-       else if ((cp = context_find(nmhstorage)) && *cp)
+       if ((cp = context_find(nmhstorage)) && *cp)
                dir = getcpy(cp);
        else
                dir = getcpy(cwd);
                dir = getcpy(cp);
        else
                dir = getcpy(cwd);