]> source.dussan.org Git - aspectj.git/commitdiff
249216:c22: escape path separators in source folder names
authoraclement <aclement>
Thu, 27 Nov 2008 22:55:55 +0000 (22:55 +0000)
committeraclement <aclement>
Thu, 27 Nov 2008 22:55:55 +0000 (22:55 +0000)
asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java

index c20428d675615721002bdeb533139fbb7de86d3c..aa4900fb9e122c1db96985d27d23df8bd13e6be3 100644 (file)
@@ -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;