thorhauer    01/10/18 13:24:10

  Modified:    src/java/org/apache/turbine/services/xmlrpc/util
                        FileHandler.java
  Log:
  adding file.separrator so that it behaves itself in windoze :-)
  
  Revision  Changes    Path
  1.4       +6 -3      
jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/util/FileHandler.java
  
  Index: FileHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/util/FileHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileHandler.java  2001/10/18 17:21:26     1.3
  +++ FileHandler.java  2001/10/18 20:24:10     1.4
  @@ -92,7 +92,7 @@
    * The client must then decode the file contents and write the
    * decoded file contents to disk.
    *
  - * @version $Id: FileHandler.java,v 1.3 2001/10/18 17:21:26 jon Exp $
  + * @version $Id: FileHandler.java,v 1.4 2001/10/18 20:24:10 thorhauer Exp $
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jon S. Stevens</a>
    */
  @@ -191,9 +191,11 @@
       public static String readFileContents(String targetLocationProperty,
                                             String fileName)
       {
  +        File tmpF = new File(".");
  +
           String file = TurbineServlet.getRealPath(
               TurbineResources.getString(targetLocationProperty) + 
  -                "/" + fileName);
  +                tmpF.separator + fileName);
   
           StringWriter sw = null;
           BufferedReader reader = null;
  @@ -203,8 +205,9 @@
                * This little routine was borrowed from the
                * velocity ContentResource class.
                */
  -            sw = new StringWriter();
               
  +            sw = new StringWriter();    
  +
               reader = new BufferedReader(
                   new InputStreamReader(
                       new FileInputStream(file)));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to