masqmail

diff src/queue.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 b27f66555ba8
children
line diff
     1.1 --- a/src/queue.c	Wed May 30 09:38:38 2012 +0200
     1.2 +++ b/src/queue.c	Wed May 30 10:27:10 2012 +0200
     1.3 @@ -54,7 +54,7 @@
     1.4  	**  Escaping the question marks prevents them from being
     1.5  	**  interpreted as trigraphs
     1.6  	*/
     1.7 -	pattern = g_strdup_printf("%s/input/?????\?-??\?-?\?-H", conf.spool_dir);
     1.8 +	pattern = g_strdup_printf("%s/?????\?-??\?-?\?-H", conf.spool_dir);
     1.9  	gl.gl_offs = 0;
    1.10  	glob(pattern, 0, NULL, &gl);
    1.11  
    1.12 @@ -73,9 +73,9 @@
    1.13  	for (i = 0; i < gl.gl_pathc; i++) {
    1.14  		gchar *uid;
    1.15  
    1.16 -		/* copy 13 chars, offset spooldir path + 7 chars for /input/ */
    1.17 +		/* copy 13 chars, offset spooldir path + 1 char for / */
    1.18  		/* uid length = 6 chars + '-' + 3 chars + '-' + 2 = 13 chars */
    1.19 -		uid = g_strndup(&(gl.gl_pathv[idx_arr[i]][strlen(conf.spool_dir) + 7]), 13);
    1.20 +		uid = g_strndup(&(gl.gl_pathv[idx_arr[i]][strlen(conf.spool_dir) + 1]), 13);
    1.21  
    1.22  		DEBUG(5) debugf("uid: %s\n", uid);
    1.23  
    1.24 @@ -196,8 +196,8 @@
    1.25  {
    1.26  	gboolean hdr_ok = TRUE;
    1.27  	gboolean dat_ok = TRUE;
    1.28 -	gchar *hdr_name = g_strdup_printf("%s/input/%s-H", conf.spool_dir, uid);
    1.29 -	gchar *dat_name = g_strdup_printf("%s/input/%s-D", conf.spool_dir, uid);
    1.30 +	gchar *hdr_name = g_strdup_printf("%s/%s-H", conf.spool_dir, uid);
    1.31 +	gchar *dat_name = g_strdup_printf("%s/%s-D", conf.spool_dir, uid);
    1.32  	struct stat stat_buf;
    1.33  
    1.34  	if (!spool_lock(uid)) {