From c031b3c8b5b21314c63a918ba2ff077a8c15c503 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Thu, 23 Apr 2020 13:10:40 +0300 Subject: [PATCH] unwanted errors have been suppressed --- .../Volo/Blogging/Blogs/BlogAppService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs index b2f84df80d..b635b95d5f 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; @@ -32,6 +33,13 @@ namespace Volo.Blogging.Blogs if (blog == null) { + FileInfo fi = new FileInfo(shortName); + + if (!string.IsNullOrEmpty(fi.Extension)) + { + return null; + } + throw new EntityNotFoundException(typeof(Blog), shortName); }