Fixes up some errors
This commit is contained in:
@@ -5,6 +5,19 @@ namespace Umbraco.Core.IO
|
||||
{
|
||||
public static class IOHelperExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Will resolve a virtual path URL to an absolute path, else if it is not a virtual path (i.e. starts with ~/) then
|
||||
/// it will just return the path as-is (relative).
|
||||
/// </summary>
|
||||
/// <param name="ioHelper"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string ResolveRelativeOrVirtualUrl(this IIOHelper ioHelper, string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path)) return path;
|
||||
return path.StartsWith("~/") ? ioHelper.ResolveUrl(path) : path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to create a directory.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user