replace existing files with saveBytes(), also look into deployJava.js (issue #650)

This commit is contained in:
benfry
2011-06-21 01:23:49 +00:00
parent 47ae658028
commit c159f0eb04
6 changed files with 53 additions and 18 deletions
@@ -4399,6 +4399,11 @@ public class PApplet extends Activity implements PConstants, Runnable {
bos.close();
bos = null;
if (targetFile.exists() && !targetFile.delete()) {
System.err.println("Could not replace " +
targetFile.getAbsolutePath() + ".");
}
if (!tempFile.renameTo(targetFile)) {
System.err.println("Could not rename temporary file " +
tempFile.getAbsolutePath());