[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,1.68,1.69

cras at procontrol.fi cras at procontrol.fi
Sun Oct 5 23:41:18 EEST 2003


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory danu:/tmp/cvs-serv3987/lib-storage/index/mbox

Modified Files:
	mbox-storage.c 
Log Message:
Strip trailing '/' from mail directory if given. Just makes it cleaner in
log files.



Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- mbox-storage.c	23 Sep 2003 19:34:34 -0000	1.68
+++ mbox-storage.c	5 Oct 2003 19:41:16 -0000	1.69
@@ -176,6 +176,11 @@
 		root_dir = create_root_dir();
 		if (root_dir == NULL)
 			return NULL;
+	} else {
+		/* strip trailing '/' */
+		size_t len = strlen(root_dir);
+		if (root_dir[len-1] == '/')
+			root_dir = t_strndup(root_dir, len-1);
 	}
 
 	if (inbox_file == NULL)



More information about the dovecot-cvs mailing list