From badd041e93c5aa982bd18298639dec09dc19be08 Mon Sep 17 00:00:00 2001 From: dmitrygusev Date: Mon, 9 Sep 2013 12:41:23 +0400 Subject: [PATCH] Fix DefaultAssetResolver --- .../anjlab/eclipse/tapestry5/DefaultAssetResolver.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/DefaultAssetResolver.java b/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/DefaultAssetResolver.java index a434ef5..14d6410 100644 --- a/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/DefaultAssetResolver.java +++ b/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/DefaultAssetResolver.java @@ -16,7 +16,14 @@ public IFile resolve(final String path, IFile relativeTo) throws AssetException @Override public String getFileName(String fileName, String fileExtension) { - return path; + int lastIndexOfDash = fileName.lastIndexOf('/'); + + if (lastIndexOfDash <= 0) + { + return path; + } + + return fileName.substring(0, lastIndexOfDash) + '/' + path; } });