fixed exception on close when trying to create sketch.properties on

linux and mac
This commit is contained in:
benfry
2002-07-23 17:52:51 +00:00
parent 81248b2b6b
commit 72645433dc
3 changed files with 19 additions and 9 deletions

View File

@@ -990,9 +990,14 @@ public class PdeEditor extends Panel {
// write sketch.properties
try {
URL url = getClass().getResource("buttons.gif");
String urlstr = url.toString();
urlstr = urlstr.substring(6, urlstr.lastIndexOf("/") + 1) +
//String urlstr = url.toString();
//System.out.println(url.getFile());
//urlstr = urlstr.substring(6, urlstr.lastIndexOf("/") + 1) +
//"sketch.properties";
String urlstr = url.getFile();
urlstr = urlstr.substring(0, urlstr.lastIndexOf("/") + 1) +
"sketch.properties";
//System.out.println(urlstr);
//System.exit(0);
FileOutputStream output = new FileOutputStream(urlstr);