Patch from Andreas Bolka to use appHome and dbHome properties
This commit is contained in:
parent
260cca8971
commit
83378773e9
2 changed files with 19 additions and 6 deletions
|
@ -199,13 +199,11 @@ public final class Application implements IPathElement, Runnable {
|
|||
// if appDir and dbDir weren't explicitely passed, use the
|
||||
// standard subdirectories of the Hop home directory
|
||||
if (appDir == null) {
|
||||
appDir = new File(home, "apps");
|
||||
appDir = new File(appDir, name);
|
||||
appDir = new File(server.getAppsHome(), name);
|
||||
}
|
||||
|
||||
if (dbDir == null) {
|
||||
dbDir = new File(home, "db");
|
||||
dbDir = new File(dbDir, name);
|
||||
dbDir = new File(server.getDbHome(), name);
|
||||
}
|
||||
|
||||
// get system-wide properties
|
||||
|
|
|
@ -673,15 +673,30 @@ public class Server implements IPathElement, Runnable {
|
|||
* @return ...
|
||||
*/
|
||||
public File getAppsHome() {
|
||||
String appHome = sysProps.getProperty("appHome");
|
||||
String appHome = sysProps.getProperty("appHome", "");
|
||||
|
||||
if ((appHome != null) && !"".equals(appHome.trim())) {
|
||||
if (appHome.trim().length() != 0) {
|
||||
return new File(appHome);
|
||||
} else {
|
||||
return new File(hopHome, "apps");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public File getDbHome() {
|
||||
String dbHome = sysProps.getProperty("dbHome", "");
|
||||
|
||||
if (dbHome.trim().length() != 0) {
|
||||
return new File(dbHome);
|
||||
} else {
|
||||
return new File(hopHome, "db");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue