uhmm, here's the patch :-)

  b
-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman
diff -rc 
commons-fileupload-1.0-beta-1.orig/src/java/org/apache/commons/fileupload/DefaultFileItem.java
 
commons-fileupload-1.0-beta-1/src/java/org/apache/commons/fileupload/DefaultFileItem.java
*** 
commons-fileupload-1.0-beta-1.orig/src/java/org/apache/commons/fileupload/DefaultFileItem.java
      Sat Feb 15 12:14:40 2003
--- 
commons-fileupload-1.0-beta-1/src/java/org/apache/commons/fileupload/DefaultFileItem.java
   Mon Feb 24 17:40:37 2003
***************
*** 575,582 ****
          if (requestSize > threshold)
          {
              String fileName = getUniqueId();
              fileName = "upload_" + fileName + ".tmp";
!             fileName = path + "/" + fileName;
              File f = new File(fileName);
              f.deleteOnExit();
              item.storeLocation = f;
--- 575,590 ----
          if (requestSize > threshold)
          {
              String fileName = getUniqueId();
+             if( path == null ){
+               try {
+                 path = System.getProperty("java.io.tmpdir");
+               }
+               catch(SecurityException ex){
+                 // doh!  cruel security policy detected :-P
+               }
+             }
              fileName = "upload_" + fileName + ".tmp";
!             fileName = path + File.separator + fileName;
              File f = new File(fileName);
              f.deleteOnExit();
              item.storeLocation = f;

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

Reply via email to