mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#19728: ResourceManager.Include ignores debug path
--HG-- branch : 1.x extra : rebase_source : 616d92673f0cf4a77ee9c0e2717b321197c0dcd3
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user