Fixes #U4-1467

This commit is contained in:
Shannon Deminick
2013-01-15 00:23:40 +03:00
parent 080e8816a5
commit beeb28f390
2 changed files with 9 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ namespace Umbraco.Core.IO
public PhysicalFileSystem(string virtualRoot)
{
_rootPath = System.Web.Hosting.HostingEnvironment.MapPath(virtualRoot);
_rootUrl = VirtualPathUtility.ToAbsolute(virtualRoot);
_rootPath = IOHelper.MapPath(virtualRoot);
_rootUrl = IOHelper.ResolveUrl(virtualRoot);
}
public PhysicalFileSystem(string rootPath, string rootUrl)

View File

@@ -13,6 +13,13 @@ namespace Umbraco.Tests.IO
public class IOHelperTest
{
[Test]
public void IOHelper_ResolveUrl()
{
var result = IOHelper.ResolveUrl("~/Scripts");
Assert.AreEqual("/Scripts", result);
}
/// <summary>
///A test for MapPath verifying that HttpContext method (which includes vdirs) matches non-HttpContext method
///</summary>