Author: markt
Date: Mon Sep 10 14:01:08 2012
New Revision: 1382855
URL: http://svn.apache.org/viewvc?rev=1382855&view=rev
Log:
Need to handle trailing slash being present and not present
Modified:
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
Modified:
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1382855&r1=1382854&r2=1382855&view=diff
==============================================================================
---
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
(original)
+++
tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
Mon Sep 10 14:01:08 2012
@@ -89,7 +89,11 @@ public class DirResourceSet implements W
String[] list = f.list();
if (list != null) {
for (String entry : list) {
- result.add(path + entry);
+ if (path.charAt(path.length() - 1) == '/') {
+ result.add(path + entry);
+ } else {
+ result.add(path + "/" + entry);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]