Skip to content

Commit

Permalink
2020.2 Patch1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ppiorunski committed Apr 21, 2021
1 parent 1324375 commit cad08b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions P4EXPProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ private static string P4VCPath()
{
Properties.Settings mySettings = new Properties.Settings();

if (_p4VCPath != null)
if ((_p4VCPath != null) && System.IO.File.Exists(_p4VCPath))
{
return _p4VCPath;
}

string prefString = mySettings.P4VCPath;

if ((prefString != null) && (prefString.EndsWith("p4vc.exe")))
if ((prefString != null) && (prefString.EndsWith("p4vc.exe")) && System.IO.File.Exists(prefString))
{
_p4VCPath = prefString;
}
Expand All @@ -140,6 +140,13 @@ private static string P4VCPath()
mySettings.Save();
return _p4VCPath;
}
else if (System.IO.File.Exists(installLocation + "p4vc.bat"))
{
mySettings.P4VCPath = installLocation + "p4vc.bat";
_p4VCPath = installLocation + "p4vc.bat";
mySettings.Save();
return _p4VCPath;
}
else
{
string message = Properties.Resources.MessageDlg_CannotLocateP4VC;
Expand Down

0 comments on commit cad08b7

Please sign in to comment.