*/
char *map_name(char *);
+static int inc_done(int);
#ifdef POP
-int done(int);
static int pop_action(char *);
static int pop_pack(char *);
static int map_count(void);
struct hes_postoffice *po;
#endif
+ done=inc_done;
+
/* absolutely the first thing we do is save our privileges,
* and drop them if we can.
*/
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");
#endif /* if 0 */
-int
-done (int status)
+static int
+inc_done (int status)
{
#ifdef POP
if (packfile && pd != NOTOK)