in src/main/java/org/apache/cayenne/modeler/utility/CayenneUserDir.java [54:82]
protected CayenneUserDir() {
super();
File tmpDir = null;
String dirName = System.getProperty(ALT_USER_DIR_PROPERTY);
if (dirName != null) {
tmpDir = new File(dirName);
}
else {
File homeDir = new File(System.getProperty("user.home"));
tmpDir = new File(homeDir, CAYENNE_DIR);
}
if (tmpDir.exists() && !tmpDir.isDirectory()) {
tmpDir = null;
}
else if (tmpDir.exists() && !tmpDir.canRead()) {
tmpDir = null;
}
else if (!tmpDir.exists()) {
tmpDir.mkdirs();
if (!tmpDir.exists()) {
tmpDir = null;
}
}
cayenneUserDir = tmpDir;
}