p5 home folder not properly being created

This commit is contained in:
benfry
2004-09-13 20:26:43 +00:00
parent bd122151e8
commit daa67d7cb3
2 changed files with 15 additions and 8 deletions

View File

@@ -129,19 +129,22 @@ public class PdeBase {
static public File getProcessingHome() {
File home = new File(System.getProperty("user.home"));
File phome = null;
if (PdeBase.platform == PdeBase.MACOSX) {
// on macosx put the sketchbook in the "Documents" folder
return new File(home, "Documents" + File.separator + "Processing");
phome = new File(home, "Documents" + File.separator + "Processing");
} else if (PdeBase.platform == PdeBase.WINDOWS) {
// on windows put the sketchbook in the "My Documents" folder
return new File(home, "My Documents" + File.separator + "Processing");
}
phome = new File(home, "My Documents" + File.separator + "Processing");
// for linux et al, make a dot folder
// if people don't like things being buried, they can move the sketches
// but the prefs will stay hidden in the dot folder
File phome = new File(home, ".processing");
} else {
// for linux et al, make a dot folder
// if people don't like things being buried, they can move the sketches
// but the prefs will stay hidden in the dot folder
phome = new File(home, ".processing");
}
if (!phome.exists()) phome.mkdirs();
return phome;
}