dovecot-2.0: maildir: Check correctly if file is a symlink.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Oct 14 20:21:01 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/df6f5d270a46
changeset: 12268:df6f5d270a46
user: Timo Sirainen <tss at iki.fi>
date: Thu Oct 14 18:20:58 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 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);
More information about the dovecot-cvs
mailing list