diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2014-04-02 22:26:20 +0400 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2014-04-04 02:22:46 +0400 |
commit | a53c2594c0d140588f23c243b8c486a0c79dfee5 (patch) | |
tree | 5ae0695ec782c0f630408ee4baffcd2fde6691a7 /main/src/core/MonoDevelop.Core | |
parent | 35feb332e356605ba6c48f08c88163e3fb5a0e71 (diff) |
[Core] Improve parsing of Mono version info
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs index 22144cf1b2..164ed5c2e3 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs @@ -120,14 +120,14 @@ namespace MonoDevelop.Core.Assemblies SetupPkgconfigPaths (null, null); string ver = output.ToString (); - int i = ver.IndexOf ("version"); + int i = ver.IndexOf ("version", StringComparison.Ordinal); if (i == -1) return false; i += 8; int j = ver.IndexOf (' ', i); if (j == -1) return false; - + monoVersion = ver.Substring (i, j - i); i = ver.IndexOf ('('); @@ -138,6 +138,9 @@ namespace MonoDevelop.Core.Assemblies j = ver.IndexOf (')', i); if (j != -1) { var rev = ver.Substring (i, j - i); + i = rev.IndexOf ('/'); + if (i != -1 && i + 1 < rev.Length) + rev = rev.Substring (i + 1); if (rev != "tarball") monoVersion += " (" + rev + ")"; } |