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
12 changes: 1 addition & 11 deletions GVFS/GVFS.Common/ProcessHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,7 @@ public static string GetCurrentProcessVersion()
public static bool IsDevelopmentVersion()
{
string version = ProcessHelper.GetCurrentProcessVersion();
/* When debugging local version with VS, the version will include +{commitId} suffix,
* which is not valid for Version class. */
var plusIndex = version.IndexOf('+');
if (plusIndex >= 0)
{
version = version.Substring(0, plusIndex);
}

Version currentVersion = new Version(version);

return currentVersion.Major == 0;
return version.Equals("0.2.173.2") || version.StartsWith("0.2.173.2+");
}

public static string GetProgramLocation(string programLocaterCommand, string processName)
Expand Down
6 changes: 5 additions & 1 deletion GVFS/GVFS/CommandLine/GVFSVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,11 @@ private bool TryValidateGVFSVersion(GVFSEnlistment enlistment, ITracer tracer, S
return true;
}

Version currentVersion = new Version(ProcessHelper.GetCurrentProcessVersion());
string recordedVersion = ProcessHelper.GetCurrentProcessVersion();
// Work around the default behavior in .NET SDK 8 where the revision ID
// is appended after a '+' character, which cannot be parsed by `System.Version`.
int plus = recordedVersion.IndexOf('+');
Version currentVersion = new Version(plus < 0 ? recordedVersion : recordedVersion.Substring(0, plus));
IEnumerable<ServerGVFSConfig.VersionRange> allowedGvfsClientVersions =
config != null
? config.AllowedGVFSClientVersions
Expand Down
Loading