From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6763 invoked from network); 6 Apr 2004 17:41:52 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Apr 2004 17:41:52 -0000 Received: (qmail 22244 invoked by alias); 6 Apr 2004 17:41:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19742 Received: (qmail 22234 invoked from network); 6 Apr 2004 17:41:41 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Apr 2004 17:41:41 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 6 Apr 2004 17:41:40 -0000 Received: (qmail 5011 invoked from network); 6 Apr 2004 17:41:40 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 6 Apr 2004 17:41:39 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i36HfBv02583 for ; Tue, 6 Apr 2004 17:41:11 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Tue, 6 Apr 2004 18:40:46 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 6 Apr 2004 18:44:20 +0100 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: Re: Globbing for Empty Directories? In-reply-to: "Wayne Davison"'s message of "Tue, 06 Apr 2004 10:27:58 PDT." <20040406172758.GB10632@blorf.net> Date: Tue, 06 Apr 2004 18:41:11 +0100 Message-ID: <27174.1081273271@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 06 Apr 2004 17:44:20.0114 (UTC) FILETIME=[CA321720:01C41BFE] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.2 required=6.0 tests=EXCUSE_16 autolearn=no version=2.63 X-Spam-Hits: 0.2 Wayne Davison wrote: > Here's a minor optimization for this function. It avoids reading the > directory if the st_nlink count is greater than 2 (since this must mean > that it has subdirs, and hence is not empty). I decided to move the > opendir() call down below this nlink test, so I had to pre-qualify the > name using S_ISDIR(). Looks OK to me. pws ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************