Assure that filenames of the form c:/foo/bar and foo/bar don't get turned into inaccessible URIs of the form file://c:/foo/bar and file://foo/bar
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@292416 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f0703188b
commit
005dd3d7d7
@ -77,9 +77,9 @@ public abstract class FileURL {
|
|||||||
userdir.replace('\\', '/');
|
userdir.replace('\\', '/');
|
||||||
|
|
||||||
if (userdir.endsWith("/")) {
|
if (userdir.endsWith("/")) {
|
||||||
return new URL("file://" + userdir + pathname);
|
return new URL("file:///" + userdir + pathname);
|
||||||
} else {
|
} else {
|
||||||
return new URL("file://" + userdir + "/" + pathname);
|
return new URL("file:///" + userdir + "/" + pathname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user