diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index 99e37b610c..2a08d3955f 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -222,11 +222,10 @@ namespace Umbraco.Web.Editors file = string.Format("/{0}", file); var filePath = IOHelper.MapPath(file); + removedFiles.Add(filePath); + if (File.Exists(filePath)) - { - removedFiles.Add(filePath); File.Delete(filePath); - } } pack.Data.Files.Remove(file); }