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:
j2blake 2012-02-23 21:11:33 +00:00
parent c4091eaa1f
commit 24f5562626
2 changed files with 4 additions and 4 deletions

View file

@ -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());
}
}