Skip to main content.
home | support | download

Back to List Archive

Re: IndexDir using Windows

From: Bill Moseley <moseley(at)>
Date: Fri Mar 01 2002 - 17:24:24 GMT
On Friday 01 March 2002 08:49 am, David L Norris wrote:
> On Fri, 2002-03-01 at 10:10, Bill Moseley wrote:
> > On Thursday 28 February 2002 10:00 pm, David L Norris wrote:
> >
> > I forgot to ask Klaus-Peter Schulze the obvious question: are you sure
> > you are using the correct version?  As I seem to remember that it was
> > WinME and Win98SE that had the problems and Win98, Win NT, and Win2K
> > worked.
> Either way, it's still not totally fixed.  We still have the appended
> '\\' problem.  I'm burning a lot of CPU time removing those in stat().

To first help Klaus-Peter Schulze, can you test in Win2K (like I did in 
Win98) to see if it works.  I'm wondering if his problem was Win2K or if, 
perhaps, his path pointed him to older version of swish.  I thought it was 
WinME and WinSE that was the problem.  (Or, no, was that something else -- 
like popen() not working at all on those??  Do you remember?)

> I would prefer using the Unix-style seperator since Windows supports
> it.  Double or quadruple escaping names is confusing.

Ok, I agree.  And then in extprog.c need to modify the delimter before 
running popen(), and again in filter.c fix up the %p path.

Let's move this to the developer's list.

> What I keep thinking is that we convert '\\' to '/' as we read them in
> from the config file or command line.  Then translate '/' to '\\'
> wherever we must.

Or just document that all paths should use a forward slash.

> > Then convert the slash when running a filter or generating output.
> I'm not real thrilled with the idea of printing file names using '\\'.
> Why?  Because then we have to start this whole translation process all
> over inside the parsing scripts.  PHP has all these same problems
> internally, and, I'd imagine PERL does too.

The recommendation in Perl is to always use forward slash, so I've never had 
this problem with Perl. 

> According to dirent.c, stat() on a NT version dating around 1993
> REQUIRED a UNC path to have a trailing '\\'.  This is why stat() was
> failing with the UNC paths a few weeks ago.  The current behavior of the
> Win32 API is that stat() FAILS on ANY directory with a trailing '\\'.
> So, it seems they have changed stat() to be consistently broken across
> all filesystem types.  In their mind, they probably would say they have
> fixed it.

Phew! It's only 9am and I'm feeling like I need a drink.


Bill Moseley
Received on Fri Mar 1 17:24:46 2002