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(); }