Do not delete files that are not there

This commit is contained in:
Rene Pfeuffer
2019-09-13 15:33:15 +02:00
parent 62cfc8484c
commit 938e52fda0

View File

@@ -122,10 +122,12 @@ public class ModifyCommandRequest implements Resetable, Validateable {
}
void cleanup() {
try {
IOUtil.delete(content);
} catch (IOException e) {
LOG.warn("could not delete temporary file {}", content, e);
if (content.exists()) {
try {
IOUtil.delete(content);
} catch (IOException e) {
LOG.warn("could not delete temporary file {}", content, e);
}
}
}
}