aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2008-11-27 22:55:55 +0000
committeraclement <aclement>2008-11-27 22:55:55 +0000
commitb62c591f7a8781119e030c884d3e7c94df77de62 (patch)
treeae86e53103a8061989e73bc26d8288fe5d61e7a1 /asm
parent1cc5811ebf365c373ec61a08703825f2d3659050 (diff)
downloadaspectj-b62c591f7a8781119e030c884d3e7c94df77de62.tar.gz
aspectj-b62c591f7a8781119e030c884d3e7c94df77de62.zip
249216:c22: escape path separators in source folder names
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index c20428d67..aa4900fb9 100644
--- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -69,7 +69,12 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
} else if (ipe.getKind() == IProgramElement.Kind.SOURCE_FOLDER) {
StringBuffer sb = new StringBuffer();
sb.append(createHandleIdentifier(ipe.getParent())).append("/");
- sb.append(ipe.getName());
+ // pr249216 - escape any embedded slashes
+ String folder = ipe.getName();
+ if (folder.indexOf("/") != -1) {
+ folder = folder.replace("/", "\\/");
+ }
+ sb.append(folder);
String handle = sb.toString();
ipe.setHandleIdentifier(handle);
return handle;