minor bug fixes, make archive sketch auto-save before running

This commit is contained in:
benfry
2005-05-07 02:55:27 +00:00
parent 8c0214d6a5
commit dd7c4d8726
4 changed files with 25 additions and 11 deletions

View File

@@ -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());