File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/net/sf/j2s/ui/property Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public static String toRelativePath(String absPath, String basePath) {
4242 int lastIndex = index ;
4343 while (index != -1 ) {
4444 String partURL = absURL .substring (0 , index );
45- if (!baseURL .startsWith (partURL )) {
45+ if (!baseURL .startsWith (partURL + "/" ) && ! baseURL . equals ( partURL )) {
4646 break ;
4747 }
4848 lastIndex = index ;
@@ -69,4 +69,10 @@ public static String toRelativePath(String absPath, String basePath) {
6969 return null ;
7070 }
7171 }
72+
73+ // public static void main(String[] args) {
74+ // String relativeStr = toRelativePath("D:/eclipse-3.3/eclipse/workspace/org.eclipse.draw2d/bin", "D:/eclipse-3.3/eclipse/workspace/org.eclipse.draw2d.examples");
75+ // String relativeStr = toRelativePath("D:/eclipse-3.3/eclipse/workspace/org.eclipse.draw2d.examples/bin", "D:/eclipse-3.3/eclipse/workspace/org.eclipse.draw2d.examples/");
76+ // System.out.println(relativeStr);
77+ // }
7278}
You can’t perform that action at this time.
0 commit comments