Don't prepend the home directory to absolute paths Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> --- .../org/spearce/jgit/transport/OpenSshConfig.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java b/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java index 9ad19e7..a6849c6 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java +++ b/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java @@ -246,10 +246,12 @@ private static String dequote(final String value) { return value.substring(1, value.length() - 2); return value; } - private File toFile(final String path) { if (path.startsWith("~/")) return new File(home, path.substring(2)); + File ret = new File(path); + if (ret.isAbsolute()) + return ret; return new File(home, path); } -- 1.6.0.rc2.35.g04c6e9 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html