fix bug in getRegistryValue

This commit is contained in:
Sebastian Sdorra
2010-12-25 18:38:44 +01:00
parent 8bba333ac0
commit cf62ffae35

View File

@@ -313,17 +313,18 @@ public class WindowsHgInstaller extends AbstractHgInstaller
while (scanner.hasNextLine())
{
String line = scanner.nextLine();
int index = line.indexOf("REG_SZ");
int index = line.indexOf("REG_SZ");
if (index > 0)
{
programmDirectory = line.substring(index
+ "REG_SZ".length()).trim();
+ "REG_SZ".length()).trim();
if (logger.isDebugEnabled())
{
logger.debug("use programm directory {}", programmDirectory);
}
break;
}
}
}