NIHVIVO-3628 Tweak the arguments to ServletContextStub.setRealPaths, so the entire prefix is provided and the method doesn't need to insert a file separator (which may be system-dependent).
This commit is contained in:
parent
c4091eaa1f
commit
24f5562626
2 changed files with 4 additions and 4 deletions
|
@ -69,12 +69,12 @@ public class ServletContextStub implements ServletContext {
|
|||
|
||||
/**
|
||||
* Call setRealPath for each of the files in this directory (non-recursive).
|
||||
* Use the prefix, a separator, and the filename as the path.
|
||||
* The prefix is the "pretend" location that we're mapping these files to,
|
||||
* e.g. "/config/". Use the prefix and the filename as the path.
|
||||
*/
|
||||
public void setRealPaths(String pathPrefix, File dir) {
|
||||
for (File file : dir.listFiles()) {
|
||||
setRealPath(pathPrefix + "/" + file.getName(),
|
||||
file.getPath());
|
||||
setRealPath(pathPrefix + file.getName(), file.getPath());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue