commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcna...@apache.org
Subject cvs commit: jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload DefaultFileItem.java
Date Tue, 09 Apr 2002 17:33:53 GMT
jmcnally    02/04/09 10:33:53

  Modified:    fileupload/src/java/org/apache/commons/fileupload
                        DefaultFileItem.java
  Log:
  patch by "Kelvin Tan" <kelvin@relevanz.com>
  to remove the temp files on jvm exit
  
  Revision  Changes    Path
  1.3       +4 -2      jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/DefaultFileItem.java
  
  Index: DefaultFileItem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/DefaultFileItem.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultFileItem.java	5 Apr 2002 22:29:22 -0000	1.2
  +++ DefaultFileItem.java	9 Apr 2002 17:33:53 -0000	1.3
  @@ -91,7 +91,7 @@
    * @author <a href="mailto:sean@informage.net">Sean Legassick</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:jmcnally@apache.org">John McNally</a>
  - * @version $Id: DefaultFileItem.java,v 1.2 2002/04/05 22:29:22 jmcnally Exp $
  + * @version $Id: DefaultFileItem.java,v 1.3 2002/04/09 17:33:53 jmcnally Exp $
    */
   public class DefaultFileItem
       implements FileItem
  @@ -392,7 +392,9 @@
               String fileName = getUniqueId();
               fileName = "upload_" + fileName + ".tmp";
               fileName = path + "/" + fileName;
  -            item.storeLocation = new File(fileName);
  +            File f = new File(fileName);
  +            f.deleteOnExit();
  +            item.storeLocation = f;
           }
           else
           {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message