Updated Branches: refs/heads/wicket-1.4.x f0fc54803 -> 7f32ecfee
fix for really gettting the resolved path and giving that to the guard Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7f32ecfe Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7f32ecfe Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7f32ecfe Branch: refs/heads/wicket-1.4.x Commit: 7f32ecfee9dbe812fa81ca73b0a27a230946b54a Parents: f0fc548 Author: Johan Compagner <[email protected]> Authored: Sun Feb 26 12:41:38 2012 +0100 Committer: Johan Compagner <[email protected]> Committed: Sun Feb 26 12:41:38 2012 +0100 ---------------------------------------------------------------------- .../apache/wicket/markup/html/PackageResource.java | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/7f32ecfe/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java ---------------------------------------------------------------------- diff --git a/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java b/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java index 8357661..5ed9636 100644 --- a/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java +++ b/wicket/src/main/java/org/apache/wicket/markup/html/PackageResource.java @@ -44,6 +44,7 @@ import org.apache.wicket.settings.IResourceSettings; import org.apache.wicket.util.lang.Classes; import org.apache.wicket.util.lang.PackageName; import org.apache.wicket.util.lang.Packages; +import org.apache.wicket.util.resource.IFixedLocationResourceStream; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.string.Strings; import org.apache.wicket.util.time.Time; @@ -667,7 +668,16 @@ public class PackageResource extends WebResource implements IModifiable, IPackag .getResourceSettings() .getPackageResourceGuard(); - return guard.accept(scope, path); + String realPath = path; + IResourceStream resourceStream = Application.get() + .getResourceSettings() + .getResourceStreamLocator() + .locate(getScope(), absolutePath, style, locale, null); + if (resourceStream instanceof IFixedLocationResourceStream) + { + realPath = ((IFixedLocationResourceStream)resourceStream).locationAsString(); + } + return guard.accept(scope, realPath); } @Override
