mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
replace existing files with saveBytes(), also look into deployJava.js (issue #650)
This commit is contained in:
@@ -5007,6 +5007,12 @@ public class PApplet extends Applet
|
||||
bos.close();
|
||||
bos = null;
|
||||
|
||||
if (targetFile.exists()) {
|
||||
if (!targetFile.delete()) {
|
||||
System.err.println("Could not replace " +
|
||||
targetFile.getAbsolutePath() + ".");
|
||||
}
|
||||
}
|
||||
if (!tempFile.renameTo(targetFile)) {
|
||||
System.err.println("Could not rename temporary file " +
|
||||
tempFile.getAbsolutePath());
|
||||
@@ -5058,6 +5064,12 @@ public class PApplet extends Applet
|
||||
output.close();
|
||||
output = null;
|
||||
|
||||
if (file.exists()) {
|
||||
if (!file.delete()) {
|
||||
System.err.println("Could not replace " + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
if (!tempFile.renameTo(file)) {
|
||||
System.err.println("Could not rename temporary file " +
|
||||
tempFile.getAbsolutePath());
|
||||
|
||||
@@ -72,6 +72,8 @@ X decision: add note to reference that the 'c' is a misnomer
|
||||
X screen.width/screen.height -> screen.width, screenW/H
|
||||
o needs to be documented, and excise all screen.width/height references
|
||||
X add to the 'changes' document
|
||||
X saveBytes() error when writing to existing file
|
||||
X http://code.google.com/p/processing/issues/detail?id=667
|
||||
|
||||
cleanup
|
||||
o if too many errors come through during setup, app will terminate
|
||||
|
||||
Reference in New Issue
Block a user