This may resolve the mysterious "Maildir: Symlink destination doesn't exist" errors. --- a/src/lib-storage/index/maildir/maildir-util.c +++ b/src/lib-storage/index/maildir/maildir-util.c @@ -91,7 +91,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);
On Thu, 2010-10-07 at 20:42 -0500, Mike Abbott wrote:> This may resolve the mysterious "Maildir: Symlink destination doesn't exist" errors. > > - if (lstat(path, &st) == 0 && (st.st_mode & S_IFLNK) != 0) { > + if (lstat(path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFLNK) {Yeah, looks like I had always just been using the S_IS*() macros so I didn't realize this had to be done. Wonder why I didn't use S_ISLNK() though. Maybe there is still some OS that doesn't support it (I see it's POSIX 2001). Anyway, committed to 1.2 and 2.0.