Skip to content

Commit

Permalink
[bugfix] Normalize paths
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Jul 13, 2016
1 parent 2f5038d commit b487ea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/org/exist/start/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public Path detectHome() {

if (Files.isReadable(jar)) {
try {
_home_dir = Paths.get(".").toAbsolutePath();
_home_dir = Paths.get(".").normalize().toAbsolutePath();
} catch (final InvalidPathException e) {
// ignore
}
Expand All @@ -510,7 +510,7 @@ public Path detectHome() {

if (_home_dir == null) {
// failed: try ../exist.jar
final Path jar = Paths.get("..").resolve("exist.jar");
final Path jar = Paths.get("..").resolve("exist.jar").normalize();
if (_debug) {
System.err.println("trying " + jar.toAbsolutePath());
}
Expand Down Expand Up @@ -542,7 +542,7 @@ public Path detectHome() {

if (_home_dir == null) {
// try ../conf.xml
final Path jar = Paths.get("..").resolve("conf.xml");
final Path jar = Paths.get("..").resolve("conf.xml").normalize();
if (_debug) {
System.err.println("trying " + jar.toAbsolutePath());
}
Expand Down

0 comments on commit b487ea7

Please sign in to comment.