Commit cd44dc9a authored by Mickaël Guessant's avatar Mickaël Guessant

From coverity: listFiles may return null

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2279 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 9c8ab6d9
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment