Mercurial > masqmail
diff src/spool.c @ 422:bdbedce60247
Remove `input' dir in spool dir. Spooled files are in spool dir directly now.
There's no more need to have any sub directories in the spool dir at all.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 30 May 2012 10:27:10 +0200 |
parents | 0430194f7ef8 |
children |
line wrap: on
line diff
--- a/src/spool.c Wed May 30 09:38:38 2012 +0200 +++ b/src/spool.c Wed May 30 10:27:10 2012 +0200 @@ -96,7 +96,7 @@ gchar *spool_file; DEBUG(5) debugf("spool_read_data entered\n"); - spool_file = g_strdup_printf("%s/input/%s-D", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-D", conf.spool_dir, msg->uid); DEBUG(5) debugf("reading data spool file '%s'\n", spool_file); in = fopen(spool_file, "r"); if (!in) { @@ -127,7 +127,7 @@ gchar *spool_file; /* header spool: */ - spool_file = g_strdup_printf("%s/input/%s-H", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-H", conf.spool_dir, msg->uid); in = fopen(spool_file, "r"); if (!in) { logwrite(LOG_ALERT, "could not open spool header file %s: %s\n", @@ -232,7 +232,7 @@ gboolean ok = TRUE; /* header spool: */ - tmp_file = g_strdup_printf("%s/input/%d-H.tmp", conf.spool_dir, getpid()); + tmp_file = g_strdup_printf("%s/%d-H.tmp", conf.spool_dir, getpid()); DEBUG(4) debugf("tmp_file = %s\n", tmp_file); if ((out = fopen(tmp_file, "w"))) { @@ -282,7 +282,7 @@ } fclose(out); if (ok) { - spool_file = g_strdup_printf("%s/input/%s-H", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-H", conf.spool_dir, msg->uid); DEBUG(4) debugf("spool_file = %s\n", spool_file); ok = (rename(tmp_file, spool_file) != -1); g_free(spool_file); @@ -319,7 +319,7 @@ if (ok && do_write_data) { /* data spool: */ - tmp_file = g_strdup_printf("%s/input/%d-D.tmp", conf.spool_dir, getpid()); + tmp_file = g_strdup_printf("%s/%d-D.tmp", conf.spool_dir, getpid()); DEBUG(4) debugf("tmp_file = %s\n", tmp_file); if ((out = fopen(tmp_file, "w"))) { @@ -338,7 +338,7 @@ } fclose(out); if (ok) { - spool_file = g_strdup_printf("%s/input/%s-D", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-D", conf.spool_dir, msg->uid); DEBUG(4) debugf("spool_file = %s\n", spool_file); ok = (rename(tmp_file, spool_file) != -1); g_free(spool_file); @@ -428,14 +428,14 @@ } /* header spool: */ - spool_file = g_strdup_printf("%s/input/%s-H", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-H", conf.spool_dir, msg->uid); if (unlink(spool_file) != 0) { logwrite(LOG_ALERT, "could not delete spool file %s: %s\n", spool_file, strerror(errno)); } g_free(spool_file); /* data spool: */ - spool_file = g_strdup_printf("%s/input/%s-D", conf.spool_dir, msg->uid); + spool_file = g_strdup_printf("%s/%s-D", conf.spool_dir, msg->uid); if (unlink(spool_file) != 0) { logwrite(LOG_ALERT, "could not delete spool file %s: %s\n", spool_file, strerror(errno)); }