Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 86550 invoked from network); 6 Mar 2009 09:07:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 09:07:53 -0000 Received: (qmail 20897 invoked by uid 500); 6 Mar 2009 09:07:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 20871 invoked by uid 500); 6 Mar 2009 09:07:46 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 20860 invoked by uid 99); 6 Mar 2009 09:07:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 01:07:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.220.168 as permitted sender) Received: from [209.85.220.168] (HELO mail-fx0-f168.google.com) (209.85.220.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 09:07:38 +0000 Received: by fxm12 with SMTP id 12so299594fxm.5 for ; Fri, 06 Mar 2009 01:07:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=p4MMFf+5C6y+V+WDZYqsbuKQEtLxMP0gbcU1YsBgBOY=; b=IpS19hqLp1NuykaQ9dfJKsdZsgmEiloJ7TQYgrHZTK0KvVZ5b/B1l1uN7DX4jhiEK8 kBumxM9GLxeGBgUjyGIjMuamXmu2VECYcrKBYpk8fVqEV/DoYxWikXiewXAZfA8QPf+P JtZWyo8lhmp+eVVLTaOwxefX9h13dl1Y6AC78= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=tPESdDJ5YkcU2sq5dhP/sEX1qF/oFhpemZue5Jsp9R+uBLdlEFslzoQvWY/FQFY3tn AONjXCgCPb/Q75yjRgeo3qCrMtGxoU93h2YhJps+8Ks6lcOP6alk/jrt4v5M7dJbl7nV Sx5z5WoCfNUvB3fIiN9f52f/O4N2Ig37kSEC4= MIME-Version: 1.0 Received: by 10.181.48.13 with SMTP id a13mr724137bkk.43.1236330437736; Fri, 06 Mar 2009 01:07:17 -0800 (PST) In-Reply-To: <14641872.1236305986442.JavaMail.root@elwamui-darkeyed.atl.sa.earthlink.net> References: <14641872.1236305986442.JavaMail.root@elwamui-darkeyed.atl.sa.earthlink.net> Date: Fri, 6 Mar 2009 09:07:17 +0000 Message-ID: <8c4e68610903060107x3e594d30ra49791b32ddc3112@mail.gmail.com> Subject: Re: deletion of index-files fails From: Ian Lea To: java-user@lucene.apache.org, rolarenfan@earthlink.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org What OS are you running? What version of lucene? Are you sure that you have privilege to delete the files that it is failing on? That they are part of the index you are trying to remove? That something else doesn't have the files open? It seems likely that you are on Windows and that something is holding on to the files. I believe that Windows won't let you delete open files. You could try calling File.deleteOnExit() for the index files. -- Ian. On Fri, Mar 6, 2009 at 2:19 AM, wrote: > So, I have a (small) Lucene index, all fine; I use it a bit, and then (on= app shutdown) want to delete its files and the containing directory (the i= ndex is intended as a temp object). At some earlier time this was working j= ust fine, using java.io.File.delete(). Now however, some of the files get d= eleted (segments*) whereas others fail (no Exn is thrown, just java.io.File= .delete() returns false: _0.cfs, _0.cfx). I've tried closing the IndexReade= r (no IndexWriter exists at shutdown), but that makes no diff. > > Any ideas? > > thanks > Paul > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org