From coverity: listFiles may return null

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2279 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-20 22:08:05 +00:00
parent abf481b39e
commit 1ea2466575
1 changed files with 5 additions and 3 deletions

View File

@ -2591,11 +2591,13 @@ public abstract class ExchangeSession {
return false;
}
});
if (oldestFiles != null) {
for (File file : oldestFiles) {
if (!file.delete()) {
LOGGER.warn("Unable to delete " + file.getAbsolutePath());
}
}
}
} catch (Exception ex) {
LOGGER.warn("Error deleting ics dump: " + ex.getMessage());
}