die() throws ex, kUserDomain for find docs folder on osx

This commit is contained in:
benfry
2005-02-28 21:49:29 +00:00
parent 3b40a6f677
commit 95d4e144c5
4 changed files with 28 additions and 15 deletions

View File

@@ -323,11 +323,19 @@ public class PdeBase {
// not clear if i can write to this folder tho..
try {
MRJOSType domainDocuments = new MRJOSType("docs");
File libraryFolder = MRJFileUtils.findFolder(domainDocuments);
//MRJFileUtils.findFolder(kUserDomain, domainDocuments);
sketchbookFolder = new File(libraryFolder, "Processing");
//File libraryFolder = MRJFileUtils.findFolder(domainDocuments);
} catch (FileNotFoundException e) {
// for 77, try switching this to the user domain, just to be sure
Method findFolderMethod =
MRJFileUtils.class.getMethod("findFolder",
new Class[] { Short.TYPE,
MRJOSType.class });
File documentsFolder = (File)
findFolderMethod.invoke(null, new Object[] { new Short(kUserDomain),
domainDocuments });
sketchbookFolder = new File(documentsFolder, "Processing");
} catch (Exception e) {
showError("sketch folder problem",
"Could not locate default sketch folder location.", e);
}