Fixes 3710: Removing the usage of HostingEnvironment.MapPath
This commit is contained in:
2
src/Umbraco.Web/Macros/MacroRenderer.cs
Normal file → Executable file
2
src/Umbraco.Web/Macros/MacroRenderer.cs
Normal file → Executable 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);
|
||||
|
||||
4
src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
Normal file → Executable file
4
src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user