Skip to content
Browse files

#4134 fix potential Windows-issue in RServi JAR loader

  • Loading branch information...
1 parent 7f05393 commit 1f5ee343783e9c5611f629fc37b5dd4d99ae8e0e @ddossot ddossot committed Dec 20, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/eu/openanalytics/rsb/rservi/webapp/ServletRJContext.java
View
5 src/main/java/eu/openanalytics/rsb/rservi/webapp/ServletRJContext.java
@@ -86,7 +86,8 @@ public ServletRJContext(final ServletContext context)
@Override
protected PathEntry searchLib(final List<PathEntry> files, final String libId)
{
- final Pattern pattern = Pattern.compile(".*/" + Pattern.quote(libId) + "([-_]{1}.*)?\\.jar$");
+ final Pattern pattern = Pattern.compile(".*" + File.separatorChar + Pattern.quote(libId)
+ + "([-_]{1}.*)?\\.jar$");
for (final PathEntry entry : files)
{
@@ -102,7 +103,7 @@ protected PathEntry searchLib(final List<PathEntry> files, final String libId)
@Override
public String getServerPolicyFilePath() throws RjInvalidConfigurationException
{
- String path = this.servletContext.getRealPath("WEB-INF/lib");
+ String path = servletContext.getRealPath("WEB-INF/lib");
final int length = path.length();
if ((length == 0)
|| ((path.charAt(length - 1) != '/') && (path.charAt(length - 1) != File.separatorChar)))

0 comments on commit 1f5ee34

Please sign in to comment.
Something went wrong with that request. Please try again.