Browse Source

Merge pull request #20770 from abpframework/auto-merge/rel-8-3/2986

Merge branch dev with rel-8.3
pull/20205/merge
maliming 2 years ago
committed by GitHub
parent
commit
fc3cec7a80
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs

9
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsService.cs

@ -74,7 +74,14 @@ public class AbpMvcLibsService : IAbpMvcLibsService, ITransientDependency
var logger = httpContext.RequestServices.GetRequiredService<ILogger<AbpMvcLibsService>>();
try
{
var fileProvider = new PhysicalFileProvider(httpContext.RequestServices.GetRequiredService<IWebHostEnvironment>().WebRootPath);
var webHostEnvironment = httpContext.RequestServices.GetRequiredService<IWebHostEnvironment>();
if (webHostEnvironment.WebRootPath.IsNullOrWhiteSpace())
{
logger.LogWarning("The 'WebRootPath' is not set! The 'CheckLibs' feature is disabled!");
return Task.FromResult(true);
}
var fileProvider = new PhysicalFileProvider(webHostEnvironment.WebRootPath);
var libsFolder = fileProvider.GetDirectoryContents("/libs");
if (!libsFolder.Exists || !libsFolder.Any())
{

Loading…
Cancel
Save