Skip to main content.
home | support | download

Back to List Archive

Re: swish-e 1.3 mangling filenames before indexing

From: Ron Samuel Klatchko <rsk(at)not-real.brightmail.com>
Date: Tue Sep 28 1999 - 16:36:12 GMT
Juergen.Puenter@Materna.DE wrote:
> Take this sample directory:
> readme.txt
> test1.txt
> test2.txt
> 
> Indexing it, I get this output:
> 
> Checking dir "./"...
>   adme.txt (no words)
>   st1.txt (4295432 words)
>   st2.txt (4295408 words)
> 
> Now, why does swish strip the first two characters from the names???

I've had a similar thing happen to me a few years back.  If I remember
correctly, it only happened when using cc (moving to gcc fixed it).

Could you try compiling and running the following program:

#include <stdio.h>
#include <dirent.h>

int main()
{
  DIR *dir;
  struct dirent *dirent;

  if ((dir = opendir(".")) == NULL) {
    perror("opendir");
    exit(1);
  }

  while ((dirent = readdir(dir)) != NULL)
    puts(dirent->d_name);

  closedir(dir);

  return 0;
}

Make sure to use the same compiler as you are currently using with
SWISH.  If you have gcc, make sure to try it as well.

moo
------------------------------------------------------------
           Ron Samuel Klatchko - Software Jester
            Brightmail Inc - rsk@brightmail.com
Received on Tue Sep 28 09:38:38 1999