Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: Globbing for Empty Directories?



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
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author