214 |
file = (file.substring(0, lastSlash) |
file = (file.substring(0, lastSlash) |
215 |
+ '/' + spec.substring(start, end)); |
+ '/' + spec.substring(start, end)); |
216 |
|
|
217 |
if (url.getProtocol().equals("file")) |
// For URLs constructed relative to a context, we |
218 |
{ |
// need to canonicalise the file path. |
219 |
// For "file" URLs constructed relative to a context, we |
file = canonicalizeFilename(file); |
|
// need to canonicalise the file path. |
|
|
try |
|
|
{ |
|
|
boolean endsWithSlash = file.charAt(file.length() - 1) == '/'; |
|
|
file = new File(file).getCanonicalPath(); |
|
|
file = file.replace(separator, '/'); |
|
|
if (endsWithSlash && file.charAt(file.length() - 1) != '/') |
|
|
file += '/'; |
|
|
} |
|
|
catch (IOException e) |
|
|
{ |
|
|
// Do nothing. |
|
|
} |
|
|
} |
|
220 |
|
|
221 |
ref = null; |
ref = null; |
222 |
} |
} |