We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63c698a commit bc2cfcdCopy full SHA for bc2cfcd
core/src/processing/core/PApplet.java
@@ -5086,11 +5086,12 @@ public OutputStream createOutput(String filename) {
5086
5087
static public OutputStream createOutput(File file) {
5088
try {
5089
- FileOutputStream fos = new FileOutputStream(file);
+ createPath(file); // make sure the path exists
5090
+ OutputStream output = new FileOutputStream(file);
5091
if (file.getName().toLowerCase().endsWith(".gz")) {
- return new GZIPOutputStream(fos);
5092
+ return new BufferedOutputStream(new GZIPOutputStream(output));
5093
}
- return fos;
5094
+ return new BufferedOutputStream(output);
5095
5096
} catch (IOException e) {
5097
e.printStackTrace();
0 commit comments