From 0a88ba05c8509aafa7cd80d530b3be41fbe6531e Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Tue, 26 Feb 2013 14:52:33 -0100 Subject: [PATCH] Corrected an issue related to the upload field when a Document without any files uploaded was deleted --- src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs index 660589dbbe..43a5160c0b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs @@ -368,7 +368,7 @@ namespace Umbraco.Core.Persistence.Repositories //Loop through properties to check if the content contains images/files that should be deleted foreach (var property in entity.Properties) { - if (property.PropertyType.DataTypeId == uploadFieldId && + if (property.PropertyType.DataTypeId == uploadFieldId && property.Value != null && string.IsNullOrEmpty(property.Value.ToString()) == false && fs.FileExists(IOHelper.MapPath(property.Value.ToString()))) {