[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.123, 1.124
cras at dovecot.org
cras at dovecot.org
Sat Oct 1 12:47:19 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv28202/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Don't break if mail root directory is '/'.
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- mbox-storage.c 1 Oct 2005 09:00:42 -0000 1.123
+++ mbox-storage.c 1 Oct 2005 09:47:17 -0000 1.124
@@ -304,7 +304,8 @@
root_dir = t_strndup(root_dir, len-1);
/* make sure the directory exists */
- if (lstat(root_dir, &st) == 0) {
+ if (*root_dir == '\0' ||
+ lstat(root_dir, &st) == 0) {
/* yep, go ahead */
} else if (errno != ENOENT && errno != ENOTDIR) {
i_error("lstat(%s) failed: %m", root_dir);
More information about the dovecot-cvs
mailing list