Remove empty files created when compilation is unsuccessful.

This commit is contained in:
Brendan Robert 2015-07-15 08:39:45 -05:00
parent bff5fc6cb4
commit 3b4960c3de

View File

@ -93,6 +93,10 @@ public class AcmeCompiler implements CompileResult<File> {
String[] params = {"--outfile", compiledAsset.getAbsolutePath(), "-f", "cbm", "--maxerrors","16",sourceFile.getAbsolutePath()};
int status = acme.run("Acme", params);
successful = status == 0;
if (!successful) {
compiledAsset.delete();
compiledAsset = null;
}
} finally {
restoreSystemOutput();
System.setProperty("user.dir", oldPath);