added checks before warning that a file could not be deleted

Former-commit-id: b98d25e875e7523288df2cb0fed0b4518e4b52f4
This commit is contained in:
Jeremy Long
2014-05-07 19:31:21 -04:00
parent f9a0f5e7a1
commit 2f5cc6a8a4

View File

@@ -178,7 +178,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
if (tempFileLocation != null && tempFileLocation.exists()) {
LOGGER.log(Level.FINE, "Attempting to delete temporary files");
final boolean success = FileUtils.delete(tempFileLocation);
if (!success) {
if (!success && tempFileLocation != null & tempFileLocation.exists()) {
LOGGER.log(Level.WARNING, "Failed to delete some temporary files, see the log for more details");
}
}