commit 65f329c56ad24b80a502f0760c23b4693eec2e75
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 cb0bc47..0d70c74 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 );
                        }

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to