mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-19 05:52:11 +01:00
fix nullpointerexception
This commit is contained in:
@@ -319,13 +319,18 @@ public class WindowsHgInstaller extends AbstractHgInstaller
|
||||
private File getMercurialDirectory(String hgBinary)
|
||||
{
|
||||
File directory = null;
|
||||
File hg = new File(hgBinary);
|
||||
|
||||
if (hg.exists() && hg.isFile())
|
||||
|
||||
if ( Util.isNotEmpty(hgBinary) )
|
||||
{
|
||||
directory = hg.getParentFile();
|
||||
File hg = new File(hgBinary);
|
||||
|
||||
if (hg.exists() && hg.isFile())
|
||||
{
|
||||
directory = hg.getParentFile();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if ( directory == null )
|
||||
{
|
||||
directory = getMercurialDirectoryFromRegistry();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user