tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r700784 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
Date Wed, 01 Oct 2008 14:23:09 GMT
Author: markt
Date: Wed Oct  1 07:23:09 2008
New Revision: 700784

URL: http://svn.apache.org/viewvc?rev=700784&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
When listing the resources for a collection, don't include invalid resources, particularly
linked resources when allowLinking=false

Modified:
    tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=700784&r1=700783&r2=700784&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Wed Oct  1 07:23:09
2008
@@ -896,7 +896,9 @@
 
         for (int i = 0; i < names.length; i++) {
 
-            File currentFile = new File(file, names[i]);
+            File currentFile = file(file.getName() + "/" + names[i]);
+            if (currentFile == null) continue;
+
             Object object = null;
             if (currentFile.isDirectory()) {
                 FileDirContext tempContext = new FileDirContext(env);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message