changeset 151:305ee74c0aa6

[2] do not rely clients supplied us absolute path
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 24 Feb 2011 20:14:11 +0100
parents 6b55f10ef54b
children 7a908ba66ff3
files src/org/tmatesoft/hg/repo/HgLookup.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgLookup.java	Thu Feb 24 18:53:33 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgLookup.java	Thu Feb 24 20:14:11 2011 +0100
@@ -39,7 +39,7 @@
 
 	// look up in specified location and above
 	public HgRepository detect(File location) throws HgException {
-		File dir = location;
+		File dir = location.getAbsoluteFile();
 		File repository;
 		do {
 			repository = new File(dir, ".hg");