mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
minor bug fixes, make archive sketch auto-save before running
This commit is contained in:
@@ -54,6 +54,20 @@ public class Archiver {
|
||||
|
||||
|
||||
public void show() {
|
||||
// first save the sketch so that things don't archive strangely
|
||||
boolean success = false;
|
||||
try {
|
||||
success = editor.sketch.save();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!success) {
|
||||
Base.showWarning("Couldn't archive sketch",
|
||||
"Archiving the sketch has been canceled because\n" +
|
||||
"the sketch couldn't save properly.", null);
|
||||
return;
|
||||
}
|
||||
|
||||
File location = editor.sketch.folder;
|
||||
String name = location.getName();
|
||||
File parent = new File(location.getParent());
|
||||
|
||||
Reference in New Issue
Block a user