don't complain about disappearing temp files
some other process might be cleaning up concurrently ...
This commit is contained in:
parent
ae85e455d3
commit
dee9f51096
|
@ -280,15 +280,16 @@ maildir_validate( const char *prefix, const char *box, int create, maildir_store
|
||||||
time( &now );
|
time( &now );
|
||||||
while ((entry = readdir( dirp ))) {
|
while ((entry = readdir( dirp ))) {
|
||||||
nfsnprintf( buf + bl, sizeof(buf) - bl, "%s", entry->d_name );
|
nfsnprintf( buf + bl, sizeof(buf) - bl, "%s", entry->d_name );
|
||||||
if (stat( buf, &st ))
|
if (stat( buf, &st )) {
|
||||||
error( "Maildir error: stat: %s: %s (errno %d)\n",
|
if (errno != ENOENT)
|
||||||
buf, strerror(errno), errno );
|
error( "Maildir error: stat: %s: %s (errno %d)\n",
|
||||||
else if (S_ISREG(st.st_mode) && now - st.st_ctime >= _24_HOURS) {
|
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
|
/* this should happen infrequently enough that it won't be
|
||||||
* bothersome to the user to display when it occurs.
|
* bothersome to the user to display when it occurs.
|
||||||
*/
|
*/
|
||||||
info( "Maildir notice: removing stale file %s\n", buf );
|
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",
|
error( "Maildir error: unlink: %s: %s (errno %d)\n",
|
||||||
buf, strerror(errno), errno );
|
buf, strerror(errno), errno );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user