* Red Hat Bug #253342: inc.c, utils.c, utils.h: When inc is run with the
[mmh] / uip / inc.c
index a2ecb44..45036f5 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -563,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");