use java7's nio api to get more detailed error messages

This commit is contained in:
Benedikt Constantin Radtke 2016-11-27 19:11:44 +01:00 committed by AsamK
parent ae3e5be124
commit e364610c93

View file

@ -1325,8 +1325,11 @@ class Manager implements Signal {
output.close(); output.close();
} }
input.close(); input.close();
if (!tmpFile.delete()) { try {
System.err.println("Failed to delete temp file: " + tmpFile); Files.delete(tmpFile.toPath());
} catch(Exception e) {
System.out.println("Failed to delete temp file: " + tmpFile);
e.printStackTrace();
} }
} }
return outputFile; return outputFile;