diff --git a/src/Orchard/UI/Resources/ResourceManager.cs b/src/Orchard/UI/Resources/ResourceManager.cs index 17d7e77a9..7fa8ee080 100644 --- a/src/Orchard/UI/Resources/ResourceManager.cs +++ b/src/Orchard/UI/Resources/ResourceManager.cs @@ -131,7 +131,7 @@ namespace Orchard.UI.Resources { } public virtual RequireSettings Include(string resourceType, string resourcePath, string resourceDebugPath) { - return Include(resourceType, resourcePath, null, null); + return Include(resourceType, resourcePath, resourceDebugPath, null); } public virtual RequireSettings Include(string resourceType, string resourcePath, string resourceDebugPath, string relativeFromPath) { @@ -142,10 +142,14 @@ namespace Orchard.UI.Resources { throw new ArgumentNullException("resourcePath"); } + // ~/ ==> convert to absolute path (e.g. /orchard/..) if (VirtualPathUtility.IsAppRelative(resourcePath)) { - // ~/ ==> convert to absolute path (e.g. /orchard/..) resourcePath = VirtualPathUtility.ToAbsolute(resourcePath); } + if (resourceDebugPath != null && VirtualPathUtility.IsAppRelative(resourceDebugPath)) { + resourceDebugPath = VirtualPathUtility.ToAbsolute(resourceDebugPath); + } + resourcePath = FixPath(resourcePath, relativeFromPath); resourceDebugPath = FixPath(resourceDebugPath, relativeFromPath); return Require(resourceType, ToAppRelativePath(resourcePath)).Define(d => d.SetUrl(resourcePath, resourceDebugPath));