From 8860e774688323ca2e20488a67165500eeceb5e6 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 21 Nov 2013 17:47:23 +1100 Subject: [PATCH] Fixes tests --- src/Umbraco.Core/PluginManager.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/PluginManager.cs b/src/Umbraco.Core/PluginManager.cs index 3aed7db380..2d00d19ee2 100644 --- a/src/Umbraco.Core/PluginManager.cs +++ b/src/Umbraco.Core/PluginManager.cs @@ -226,8 +226,12 @@ namespace Umbraco.Core //add each unique file's contents to the hash foreach (var i in fileContents.Select(x => x.Item1).DistinctBy(x => x.FullName)) { - var content = File.ReadAllText(i.FullName).Replace("\r\n", string.Empty).Replace("\n", string.Empty).Replace("\r", string.Empty); - hashCombiner.AddCaseInsensitiveString(content); + if (File.Exists(i.FullName)) + { + var content = File.ReadAllText(i.FullName).Replace("\r\n", string.Empty).Replace("\n", string.Empty).Replace("\r", string.Empty); + hashCombiner.AddCaseInsensitiveString(content); + } + } return ConvertPluginsHashFromHex(hashCombiner.GetCombinedHashCode());