diff src/org/tmatesoft/hg/repo/HgLookup.java @ 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 1a7a9a20e1f9
children 8c8e3f372fa1
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");