tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/resources FileResources.java
Date Fri, 04 Aug 2000 23:49:55 GMT
craigmcc    00/08/04 16:49:55

  Modified:    proposals/catalina/src/share/org/apache/tomcat/resources
                        FileResources.java
  Log:
  Fix a Watchdog FAIL -- ServletContext.getRealPath() was returning null if
  no file at the specified path is not there.  Now it returns the path
  anyway.
  
  Revision  Changes    Path
  1.10      +7 -10     jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/resources/FileResources.java
  
  Index: FileResources.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/resources/FileResources.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileResources.java	2000/08/03 17:04:22	1.9
  +++ FileResources.java	2000/08/04 23:49:53	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/resources/FileResources.java,v
1.9 2000/08/03 17:04:22 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2000/08/03 17:04:22 $
  + * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/resources/FileResources.java,v
1.10 2000/08/04 23:49:53 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2000/08/04 23:49:53 $
    *
    * ====================================================================
    *
  @@ -93,7 +93,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2000/08/03 17:04:22 $
  + * @version $Revision: 1.10 $ $Date: 2000/08/04 23:49:53 $
    */
   
   public final class FileResources extends ResourcesBase {
  @@ -177,12 +177,9 @@
   	    return (null);
   	validate(normalized);
   
  -	// Return a real path if such a file actually exists
  -	File file = file(normalized);
  -	if (file != null)
  -	    return (file.getAbsolutePath());
  -	else
  -	    return (null);
  +	// Return a real path to where this file does, or would, exist
  +	File file = new File(base, normalized.substring(1));
  +	return (file.getAbsolutePath());
   
       }
   
  
  
  

Mime
View raw message