Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9622:1ecf1c3f7ecf HEAD
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:26 +0100 |
parents | 1b40e217e020 |
children | b2d30a8d3fb4 |
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 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);