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
|
// if appDir and dbDir weren't explicitely passed, use the
|
||||||
// standard subdirectories of the Hop home directory
|
// standard subdirectories of the Hop home directory
|
||||||
if (appDir == null) {
|
if (appDir == null) {
|
||||||
appDir = new File(home, "apps");
|
appDir = new File(server.getAppsHome(), name);
|
||||||
appDir = new File(appDir, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbDir == null) {
|
if (dbDir == null) {
|
||||||
dbDir = new File(home, "db");
|
dbDir = new File(server.getDbHome(), name);
|
||||||
dbDir = new File(dbDir, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get system-wide properties
|
// get system-wide properties
|
||||||
|
|
|
@ -673,15 +673,30 @@ public class Server implements IPathElement, Runnable {
|
||||||
* @return ...
|
* @return ...
|
||||||
*/
|
*/
|
||||||
public File getAppsHome() {
|
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);
|
return new File(appHome);
|
||||||
} else {
|
} else {
|
||||||
return new File(hopHome, "apps");
|
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