From bug-request at octave dot org Tue Feb 21 12:56:37 2006 Subject: Re: Recursing Network Paths in Cygwin From: "James R. Phillips" To: bug at octave dot org Date: Tue, 21 Feb 2006 10:54:57 -0800 (PST) -- "John W. Eaton" wrote: > I checked in that patch, but then changed it slightly. The final > change (relative to the original version) is: >[...] The assumption is > that a directory has no subdirectories if its link count is exactly > 2. Otherwise, we have to check by looking at all the files. If this > fails for some other case, then we can always turn off the > ST_NLINK_TRICK, though it will slow file searching down a bit. > > The code in the find utility is even tickier, in that it uses the link > count to decide when to stop processing files to see if they are > directories. For example, if the link count for a directory is 4, > find will stop after it locates 2 subdirectories (the other 2 links > are for "." and ".."). For find, you can disable this behavior with > -noleaf. Should Octave have a similar run-time option? > > jwe > I think having a run-time option that completely disables the optimization may be a good idea as a backstop, since we are not certain at this time of all the ways the optimization might fail. This will allow a work-around for whenever such a bug might manifest itself. Actually, it might be a good idea to allow this run-time option for all architectures, not just cygwin. I guess I can take responsibility for maintaining a cygwin-specific patch for this bug against 2.1.x, until such time as 2.9.x is declared stable. This will result in a new cygwin release for 2.1.72 in the "near future". jrp ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------