Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3da25b7

Browse files
author
zhourenjian
committed
Fixing bug#2797451 j2s incorrectly sets up namespace of cross-referenced project
http://sourceforge.net/tracker/?func=detail&aid=2797451&group_id=155436&atid=795800
1 parent7f6a018 commit3da25b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/net/sf/j2s/ui/property/FileUtil.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static String toRelativePath(String absPath, String basePath) {
4242
intlastIndex =index;
4343
while (index != -1) {
4444
StringpartURL =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
returnnull;
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
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp