#19728: ResourceManager.Include ignores debug path

--HG--
branch : 1.x
extra : rebase_source : 616d92673f0cf4a77ee9c0e2717b321197c0dcd3
This commit is contained in:
Bertrand Le Roy
2013-05-19 17:28:19 -07:00
parent caeb25ac43
commit 85aadd8e8b

View File

@@ -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));