From 577f261a7bbf86ec5b83ec76c94cb0adbfbb894d Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 11 Apr 2011 16:29:24 +0400 Subject: [PATCH] HgFile: correctly calculate relative path for root. --- plugins/hg4idea/src/org/zmlx/hg4idea/HgFile.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgFile.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgFile.java index c1303b834d13..15a7d85718c8 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/HgFile.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgFile.java @@ -75,6 +75,9 @@ public class HgFile { } private static String buildRelativePath(File anchestor, File descendant) { + if (anchestor.equals(descendant)) { + return "."; + } if (anchestor.equals(descendant.getParentFile())) { return descendant.getName(); }