Re: Option to *not* recurse directories

Peter Karman <[email protected]> Fri, 22 Sep 2006 20:47:05 -0700 (PDT)
Newsgroups gmane.comp.web.swish-e
Message-ID <[email protected]>

David Brown scribbled on 9/22/06 9:12 PM:

> 
> 	FileRules dirname contains "$path/"
> 
> ..where $path is replaced by the value of IndexDir. So if the dirname has
> an extra slash beyond the starting path, it ought to be a subdirectory,
> right? I think this will be faster, but it's less general-purpose. And there
> might be issues with \ vs. / as delimiter under Windows?
> 
> Am I on the right track? Other suggestions? I guess I'll discover what works
> soon enough.
> 
> Okay, I left that in "drafts" while finishing up the actual code. I went
> with the "FileRules dirname" method -- using a forward slash under Windows
> -- and it did what I want. 
> 
> Still seems like there ought to be an easier way to turn off recursion...
> maybe something to consider for 3.0?

yes, a RecursionDepth config option seems like a good idea.

I tried a couple different regexp variations to get the same affect but couldn't 
hit on the right combo either. Bill might have a better idea.

If you used DirTree.pl with -S prog, you could just change the check_dir()
routine to return 0.

-- 
Peter Karman  .  http://peknet.com/  .  [email protected]