fix urls test (windows specific)

This commit is contained in:
Vladimir Krivosheev
2013-02-24 23:40:24 +04:00
parent 4d193ae5b0
commit 8ac85d658d
@@ -501,16 +501,16 @@ public class VfsUtil extends VfsUtilCore {
}
else if (SystemInfoRt.isWindows && url.regionMatches(0, LocalFileSystem.PROTOCOL_PREFIX, 0, LocalFileSystem.PROTOCOL_PREFIX.length())) {
// file:///C:/test/file.js -> file://C:/test/file.js
for (int i = index + 3; i < url.length(); i++) {
for (int i = index + 4; i < url.length(); i++) {
char c = url.charAt(i);
if (c == '/') {
return url;
}
else if (c == ':') {
break;
}
else if (c == ':') {
return LocalFileSystem.PROTOCOL_PREFIX + url.substring(index + 4);
}
}
return LocalFileSystem.PROTOCOL_PREFIX + url.substring(index + 3);
return url;
}
return url;
}