# HG changeset patch # User Timo Sirainen # Date 1287076858 -3600 # Node ID df6f5d270a46a5be1a69f3137cf9d7307d5d1dff # Parent ff1ac6f22ba10b2c040dbea4a6474b1bda05dbc2 maildir: Check correctly if file is a symlink. Patch by Mike Abbott / Apple. diff -r ff1ac6f22ba1 -r df6f5d270a46 src/lib-storage/index/maildir/maildir-util.c --- 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);