Skip to content

Commit

Permalink
Simplify code (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed May 16, 2021
1 parent 701c263 commit c9ac99c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,17 @@ public static String currDirPath() {
}
}
// Try normalizing path
currDirPathStr = "";
if (path != null) {
currDirPathStr = null;
try {
currDirPathStr = path.toRealPath(LinkOption.NOFOLLOW_LINKS).toString();
} catch (IOError | SecurityException | IOException e) {
// Fall through
}
} else {
currDirPathStr = "";
}
// Normalize current directory the same way all other paths are normalized in ClassGraph,
// for consistency
currDirPath = currDirPathStr == null ? "" : FastPathResolver.resolve(currDirPathStr);
currDirPath = FastPathResolver.resolve(currDirPathStr);
}
return currDirPath;
}
Expand Down

0 comments on commit c9ac99c

Please sign in to comment.