Updates following PR review.
This commit is contained in:
@@ -675,7 +675,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
|
||||
public IEnumerable<string> GetPartialViewSnippetNames(params string[] filterNames)
|
||||
{
|
||||
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.Path}/PartialViewMacros/Templates/");
|
||||
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.UmbracoPath}/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.Path}/PartialViewMacros/Templates/{fileName}");
|
||||
var snippetPath = _hostingEnvironment.MapPathContentRoot($"{_globalSettings.UmbracoPath}/PartialViewMacros/Templates/{fileName}");
|
||||
return System.IO.File.Exists(snippetPath)
|
||||
? Attempt<string>.Succeed(snippetPath)
|
||||
: Attempt<string>.Fail();
|
||||
|
||||
Reference in New Issue
Block a user