commit f8c894297133c889bc97661f0a51d92bc92f6e12 Author: Oswald Buddenhagen <o...@kde.org> Date: Sun Mar 27 20:39:53 2011 +0200
don't complain about disappearing temp files some other process might be cleaning up concurrently ... src/drv_maildir.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index 92142ad..1fe3c51 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -280,15 +280,16 @@ maildir_validate( const char *prefix, const char *box, int create, maildir_store time( &now ); while ((entry = readdir( dirp ))) { nfsnprintf( buf + bl, sizeof(buf) - bl, "%s", entry->d_name ); - if (stat( buf, &st )) - error( "Maildir error: stat: %s: %s (errno %d)\n", - buf, strerror(errno), errno ); - else if (S_ISREG(st.st_mode) && now - st.st_ctime >= _24_HOURS) { + if (stat( buf, &st )) { + if (errno != ENOENT) + error( "Maildir error: stat: %s: %s (errno %d)\n", + buf, strerror(errno), errno ); + } else if (S_ISREG(st.st_mode) && now - st.st_ctime >= _24_HOURS) { /* this should happen infrequently enough that it won't be * bothersome to the user to display when it occurs. */ info( "Maildir notice: removing stale file %s\n", buf ); - if (unlink( buf )) + if (unlink( buf ) && errno != ENOENT) error( "Maildir error: unlink: %s: %s (errno %d)\n", buf, strerror(errno), errno ); } ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel