Fixes 3710: Removing the usage of HostingEnvironment.MapPath

This commit is contained in:
Aaron Powell
2018-11-19 14:31:20 +11:00
parent 889e48ea4a
commit e1be4effca
2 changed files with 3 additions and 3 deletions

2
src/Umbraco.Web/Macros/MacroRenderer.cs Normal file → Executable file
View File

@@ -190,7 +190,7 @@ namespace Umbraco.Web.Macros
var filename = GetMacroFileName(model);
if (filename == null) return null;
var mapped = HostingEnvironment.MapPath(filename);
var mapped = IOHelper.MapPath(filename);
if (mapped == null) return null;
var file = new FileInfo(mapped);

View File

@@ -133,8 +133,8 @@ namespace Umbraco.Web.PublishedCache.NuCache
if (registered)
{
var localContentDbPath = HostingEnvironment.MapPath("~/App_Data/NuCache.Content.db");
var localMediaDbPath = HostingEnvironment.MapPath("~/App_Data/NuCache.Media.db");
var localContentDbPath = IOHelper.MapPath("~/App_Data/NuCache.Content.db");
var localMediaDbPath = IOHelper.MapPath("~/App_Data/NuCache.Media.db");
_localDbExists = System.IO.File.Exists(localContentDbPath) && System.IO.File.Exists(localMediaDbPath);
// if both local dbs exist then GetTree will open them, else new dbs will be created