X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Finc.c;h=45036f5baa0877b399fdcbdda930f76939e0ddc4;hb=7edb0cbc236244d996d1e2ae1d58d0e9f7d98062;hp=0731a1571227d224ecae6036a2b5c56e422471bf;hpb=08aa8c17c3241bb5c6a997ed2e01e25a4d0089ce;p=mmh diff --git a/uip/inc.c b/uip/inc.c index 0731a15..45036f5 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -29,6 +29,7 @@ #endif #include +#include #include #ifdef POP @@ -456,7 +457,7 @@ main (int argc, char **argv) if (folder) adios (NULL, "only one folder at a time!"); else - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); } else { adios (NULL, "usage: %s [+folder] [switches]", invo_name); } @@ -562,10 +563,15 @@ main (int argc, char **argv) if ((maildir_copy = strdup(maildir)) == (char *)0) adios (maildir, "error allocating memory to copy maildir"); - if (noisy) - create_folder(maildir, 0, done); - else - done (1); + if (!folder_exists(maildir)) { + /* If the folder doesn't exist, and we're given the -silent flag, + * just fail. + */ + if (noisy) + create_folder(maildir, 0, done); + else + done (1); + } if (chdir (maildir) == NOTOK) adios (maildir, "unable to change directory to");