From b4987f510fb3494bfc5b11fc92d2047cdb51642b Mon Sep 17 00:00:00 2001 From: Eric Schnoebelen Date: Fri, 31 Aug 2012 09:49:37 -0400 Subject: [PATCH] Move chdir() call so -recurse option works again This commit is ported from nmh. --- uip/folder.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/uip/folder.c b/uip/folder.c index 3ca0e7d..4ffb9f5 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -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); -- 1.7.10.4