Aligned property names in code with those in configuration.

This commit is contained in:
Andy Butland
2020-08-25 10:45:54 +02:00
parent 2c05718689
commit 967f0be705
32 changed files with 73 additions and 81 deletions

View File

@@ -675,7 +675,7 @@ namespace Umbraco.Core.Services.Implement
public IEnumerable<string> GetPartialViewSnippetNames(params string[] filterNames)
{
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.UmbracoPath}/PartialViewMacros/Templates/");
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.Path}/PartialViewMacros/Templates/");
var files = Directory.GetFiles(snippetPath, "*.cshtml")
.Select(Path.GetFileNameWithoutExtension)
.Except(filterNames, StringComparer.InvariantCultureIgnoreCase)
@@ -909,7 +909,7 @@ namespace Umbraco.Core.Services.Implement
fileName += ".cshtml";
}
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.UmbracoPath}/PartialViewMacros/Templates/{fileName}");
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.Path}/PartialViewMacros/Templates/{fileName}");
return System.IO.File.Exists(snippetPath)
? Attempt<string>.Succeed(snippetPath)
: Attempt<string>.Fail();