1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-11-15 13:55:09 -05:00

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

View File

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