Fixes: #U4-1916 and another issue for vdirs, added unit tests, changed UI web project to always

launch in a VDIR.
This commit is contained in:
Shannon Deminick
2013-03-15 08:03:19 +04:00
parent 5bd2571395
commit 04b9607741
5 changed files with 37 additions and 8 deletions

View File

@@ -183,16 +183,26 @@ namespace Umbraco.Core.IO
}
}
private static string _root;
/// <summary>
/// Gets the root path of the application
/// </summary>
public static string Root
{
get
{
string appPath = HttpRuntime.AppDomainAppVirtualPath ?? string.Empty;
if (appPath == "/")
appPath = string.Empty;
if (_root == null)
{
string appPath = HttpRuntime.AppDomainAppVirtualPath ?? string.Empty;
if (appPath == "/")
appPath = string.Empty;
return appPath;
_root = appPath;
}
return _root;
}
//Only required for unit tests
internal set { _root = value; }
}
}