Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4344:34179afd158a HEAD
If file begins with ".nfs", stat() it always to see if it's a directory
since it may be a temporary file created by kernel.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 16 Jun 2006 12:26:06 +0300 |
parents | 407e6c620d70 |
children | f5d9c2b4d118 |
files | src/lib-storage/index/maildir/maildir-list.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-list.c Fri Jun 16 12:25:19 2006 +0300 +++ b/src/lib-storage/index/maildir/maildir-list.c Fri Jun 16 12:26:06 2006 +0300 @@ -95,7 +95,9 @@ ; else #endif - if (stat_dirs) { + /* Check files beginning with .nfs always because they may be + temporary files created by the kernel */ + if (stat_dirs || strncmp(fname, ".nfs", 4) == 0) { t_push(); path = t_strdup_printf("%s/%s", ctx->dir, fname); hide = stat(path, &st) < 0 || !S_ISDIR(st.st_mode);