dovecot-1.2: maildir: Check correctly if file is a symlink.

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 14 20:20:32 EEST 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/1ecf1c3f7ecf
changeset: 9622:1ecf1c3f7ecf
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 14 18:20:26 2010 +0100
description:
maildir: Check correctly if file is a symlink.
Patch by Mike Abbott / Apple.

diffstat:

 src/lib-storage/index/maildir/maildir-util.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 1b40e217e020 -r 1ecf1c3f7ecf src/lib-storage/index/maildir/maildir-util.c
--- a/src/lib-storage/index/maildir/maildir-util.c	Thu Oct 14 16:31:34 2010 +0100
+++ b/src/lib-storage/index/maildir/maildir-util.c	Thu Oct 14 18:20:26 2010 +0100
@@ -90,7 +90,7 @@
 {
 	struct stat st;
 
-	if (lstat(path, &st) == 0 && (st.st_mode & S_IFLNK) != 0) {
+	if (lstat(path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFLNK) {
 		/* most likely a symlink pointing to a non-existing file */
 		mail_storage_set_critical(&mbox->storage->storage,
 			"Maildir: Symlink destination doesn't exist: %s", path);


More information about the dovecot-cvs mailing list