changeset 12268:df6f5d270a46

maildir: Check correctly if file is a symlink. Patch by Mike Abbott / Apple.
author Timo Sirainen <tss@iki.fi>
date Thu, 14 Oct 2010 18:20:58 +0100
parents ff1ac6f22ba1
children 5cc31ecf199e
files src/lib-storage/index/maildir/maildir-util.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-util.c	Thu Oct 14 17:23:11 2010 +0100
+++ b/src/lib-storage/index/maildir/maildir-util.c	Thu Oct 14 18:20:58 2010 +0100
@@ -92,7 +92,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 nonexistent file */
 		mail_storage_set_critical(&mbox->storage->storage,
 			"Maildir: Symlink destination doesn't exist: %s", path);