Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion GVFS/GVFS.Common/GVFSPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public abstract class GVFSPlatformConstants

public abstract string GVFSExecutableName { get; }

public abstract string ProgramLocaterCommand { get; }

/// <summary>
/// Different platforms can have different requirements
Expand Down
2 changes: 1 addition & 1 deletion GVFS/GVFS.Platform.Windows/WindowsGitInstallation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public bool GitExists(string gitBinPath)
return File.Exists(gitBinPath);
}

return ProcessHelper.GetProgramLocation(GVFSPlatform.Instance.Constants.ProgramLocaterCommand, GitProcessName) != null;
return !string.IsNullOrEmpty(GetInstalledGitBinPath());
}

public string GetInstalledGitBinPath()
Expand Down
11 changes: 3 additions & 8 deletions GVFS/GVFS.Platform.Windows/WindowsPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ public override bool TryGetGVFSHooksVersion(out string hooksVersion, out string
{
error = null;
hooksVersion = null;
string hooksPath = ProcessHelper.GetProgramLocation(GVFSPlatform.Instance.Constants.ProgramLocaterCommand, GVFSPlatform.Instance.Constants.GVFSHooksExecutableName);
if (hooksPath == null)
string hooksPath = Path.Combine(ProcessHelper.GetCurrentProcessLocation(), GVFSPlatform.Instance.Constants.GVFSHooksExecutableName);
if (hooksPath == null || !File.Exists(hooksPath))
{
error = "Could not find " + GVFSPlatform.Instance.Constants.GVFSHooksExecutableName;
return false;
}

FileVersionInfo hooksFileVersionInfo = FileVersionInfo.GetVersionInfo(Path.Combine(hooksPath, GVFSPlatform.Instance.Constants.GVFSHooksExecutableName));
FileVersionInfo hooksFileVersionInfo = FileVersionInfo.GetVersionInfo(hooksPath);
hooksVersion = hooksFileVersionInfo.ProductVersion;
return true;
}
Expand Down Expand Up @@ -444,11 +444,6 @@ public override string GVFSExecutableName
get { return "GVFS" + this.ExecutableExtension; }
}

public override string ProgramLocaterCommand
{
get { return "where"; }
}

public override HashSet<string> UpgradeBlockingProcesses
{
get { return new HashSet<string>(GVFSPlatform.Instance.Constants.PathComparer) { "GVFS", "GVFS.Mount", "git", "ssh-agent", "wish", "bash" }; }
Expand Down
5 changes: 0 additions & 5 deletions GVFS/GVFS.UnitTests/Mock/Common/MockPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ public override string GVFSExecutableName
{
get { return "MockGVFS" + this.ExecutableExtension; }
}

public override string ProgramLocaterCommand
{
get { return "MockWhere"; }
}

public override HashSet<string> UpgradeBlockingProcesses
{
Expand Down