From a5f810028d2f39a5a6df6d9571a932ee99a8db4f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 6 Dec 2014 11:57:36 -0800 Subject: [PATCH] Fixed regression on mono - Use HOME instead of ProgramFiles - Removed tracing for replacement attempts #974 --- src/Microsoft.Framework.Runtime/Servicing/ServicingIndex.cs | 2 -- src/Microsoft.Framework.Runtime/Servicing/ServicingTable.cs | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Framework.Runtime/Servicing/ServicingIndex.cs b/src/Microsoft.Framework.Runtime/Servicing/ServicingIndex.cs index 9e26bf068..a0dedc549 100644 --- a/src/Microsoft.Framework.Runtime/Servicing/ServicingIndex.cs +++ b/src/Microsoft.Framework.Runtime/Servicing/ServicingIndex.cs @@ -84,8 +84,6 @@ public void Initialize(string folderPath) public bool TryGetReplacement(string packageId, SemanticVersion packageVersion, string assetPath, out string replacementPath) { - Trace.TraceInformation("[{0}]: TryGetReplacement {1} {2} {3}", GetType().Name, packageId, packageVersion, assetPath); - Entry entry; if (_entries.TryGetValue(new EntryKey(packageId, packageVersion), out entry)) { diff --git a/src/Microsoft.Framework.Runtime/Servicing/ServicingTable.cs b/src/Microsoft.Framework.Runtime/Servicing/ServicingTable.cs index b2ff46e95..70684f619 100644 --- a/src/Microsoft.Framework.Runtime/Servicing/ServicingTable.cs +++ b/src/Microsoft.Framework.Runtime/Servicing/ServicingTable.cs @@ -31,11 +31,15 @@ private static ServicingIndex LoadIndex() var kreServicing = Environment.GetEnvironmentVariable("KRE_SERVICING"); if (string.IsNullOrEmpty(kreServicing)) { + var servicingRoot = Environment.GetEnvironmentVariable("ProgramFiles") ?? + Environment.GetEnvironmentVariable("HOME"); + kreServicing = Path.Combine( - Environment.GetEnvironmentVariable("ProgramFiles"), + servicingRoot, "KRE", "Servicing"); } + index.Initialize(kreServicing); return index; });