Skip to content

Commit

Permalink
0001756: dbimport doesn't handle relative pathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Nov 27, 2014
1 parent 33dd1ea commit 8e93e05
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions symmetric-util/src/main/java/org/jumpmind/util/AppUtils.java
Expand Up @@ -61,6 +61,21 @@ public class AppUtils {

private static FastDateFormat timezoneFormatter = FastDateFormat.getInstance("Z");

public static String getSymHome() {
String home = System.getenv("SYM_HOME");
if (home == null) {
home = ".";
}
return home;
}

public static String getCanonicalSymHome(String dirName) {
if (!dirName.startsWith("/") && !dirName.startsWith("\\")) {
dirName = getSymHome() + "/" + dirName;
}
return dirName;
}

public static String getHostName() {
String hostName = System.getProperty(SYSPROP_HOST_NAME, UNKNOWN);
if (UNKNOWN.equals(hostName)) {
Expand Down

0 comments on commit 8e93e05

Please sign in to comment.