Merge branch 'master'
authormarkus schnalke <meillo@marmaro.de>
Fri, 23 Oct 2015 12:26:49 +0000 (14:26 +0200)
committermarkus schnalke <meillo@marmaro.de>
Fri, 23 Oct 2015 12:26:49 +0000 (14:26 +0200)
uip/folder.c
uip/mhoutsbr.c

index 3ca0e7d..4ffb9f5 100644 (file)
@@ -329,16 +329,17 @@ main(int argc, char **argv)
        /*
        ** Scan the folders
        */
+       /*
+       ** change directory to base of nmh directory for
+       ** crawl_folders
+       */
+       if (chdir(nmhdir) == NOTOK) {
+               adios(EX_OSERR, nmhdir, "unable to change directory to");
+       }
        if (all || ftotal > 0) {
                /*
                ** If no folder is given, do them all
                */
-               /*
-               ** change directory to base of nmh directory for
-               ** crawl_folders
-               */
-               if (chdir(nmhdir) == NOTOK)
-                       adios(EX_OSERR, nmhdir, "unable to change directory to");
                if (!argfolder) {
                        if (msg)
                                admonish(NULL, "no folder given for message %s", msg);
index ba88319..87e7943 100644 (file)
@@ -228,7 +228,7 @@ writeQuoted(CT ct, FILE *out)
                        n = 0;
                }
                for (; *cp; cp++) {
-                       if (n > CPERLIN - 3) {
+                       if (n + 1 >= CPERLIN) {
                                fputs("=\n", out);
                                n = 0;
                        }