Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 69293 invoked from network); 1 Jul 2003 08:06:17 -0000 Received: from unknown (HELO seel.internal.lammtara.net) (62.189.157.240) by daedalus.apache.org with SMTP; 1 Jul 2003 08:06:17 -0000 Received: from lamrosxp16 (lammtara-gw.lammtara.net [62.189.157.240]) by seel.internal.lammtara.net (8.12.3/8.12.3/Debian -4) with ESMTP id h6188n2b017237 for ; Tue, 1 Jul 2003 09:08:49 +0100 From: "Bill Comer" To: "'Jakarta Commons Users List'" Subject: FileUpload - deletion of temp files problem Date: Tue, 1 Jul 2003 09:06:37 +0100 Message-ID: <000b01c33fa7$b24069c0$7502000a@lamrosxp16> MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <1057012559.6881.48.camel@pcsimon.ecnnz.ecnetwork.co.nz> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi there, I have some servlet code that is correctly uploading two files however two parameters that are passed to the servlet are also creating temp files that I am unable to delete until resin restarts. As this will be infrequent I need to resolve this. I can see that File.deleteOnExit() is called but I have also explicitly called FileItem.delete() I have modified Fileitem.delete() to return a boolean (which incidently I would have thought to be a good idea anyway...shall I pass this to the dev forum?) public boolean delete() { byteStream = null; content = null; boolean ret = false; if (storeLocation != null && storeLocation.exists()) { ret = storeLocation.delete(); } return ret; } This always returns 'false' !!! Any clues ? Bill --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003